Bug 33288 - gcc ia64 Error: integer operand out of range
Summary: gcc ia64 Error: integer operand out of range
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.3
Hardware: ia64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-03-26 23:13 UTC by John Reiser
Modified: 2007-04-18 16:32 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2001-03-26 23:13:58 UTC


Attachments (Terms of Use)

Description John Reiser 2001-03-26 23:13:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.5-15 i586)


/tmp/ccGEUAnh.s:707300: Error: integer operand out of range

This message (and several hundred thousand others like it)
appears when compiling a large C file: 1000 functions, each
of which returns the sum of values from calling all the rest.

(This was fallout from tyring to generate a testcase which
would tickle the loader message "R_PCREL21B: operand truncated"
[or similar].)


Reproducible: Always
Steps to Reproduce:
1. compile & run the program to generate the large .c source file:
	gcc -o gen gen.c
	./gen  > big.c
2. compile the large .c file
	gcc big.c
3.
-----generator program gen.c
main()
{
	int f,g;
	for (f=0; f<1000; ++f) {
		printf("static int f%d(int);\n",f);
	}
	for (f=0; f<1000; ++f) {
		printf(
"static int f%d(int j){\n"
"	return 0\n"
			, f );
		for (g=0; g<1000; ++g) if (g!=f) {
			printf(
"		+f%d(j)\n"
			, g);
		}
		printf("\t;\n}\n");
	}
	printf("int main(){\n\treturn f500(5);\n}\n");
	return 0;
}
-----end generator program
	

Actual Results: 
	... 
/tmp/ccGEUAnh.s:707250: Error: integer operand out of range
/tmp/ccGEUAnh.s:707260: Error: integer operand out of range
/tmp/ccGEUAnh.s:707270: Error: integer operand out of range
/tmp/ccGEUAnh.s:707280: Error: integer operand out of range
/tmp/ccGEUAnh.s:707290: Error: integer operand out of range
	...
etc.


Expected Results:  No complaint.

Compiling the large .c file takes about 1 hour.

Comment 1 Jakub Jelinek 2001-04-25 15:46:17 UTC
And for this the answer is don't do that.
Unlike the limitation on the size of code section within one binary/dso,
limitation of a code section within one .o to 8MB does not seem too serious.

Comment 2 Paul Pluzhnikov 2001-04-25 17:03:42 UTC
Would you please reconsider:

The limitation above may not be too serious for hand-written code,
but it quickly becomes serious for code-generation and code-instrumentation
tools.


Note You need to log in before you can comment on or make changes to this bug.