Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 33288 - gcc ia64 Error: integer operand out of range
gcc ia64 Error: integer operand out of range
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
ia64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-03-26 18:13 EST by John Reiser
Modified: 2007-04-18 12:32 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-03-26 18:13:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Reiser 2001-03-26 18:13:55 EST
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
-----generator program gen.c
	int f,g;
	for (f=0; f<1000; ++f) {
		printf("static int f%d(int);\n",f);
	for (f=0; f<1000; ++f) {
"static int f%d(int j){\n"
"	return 0\n"
			, f );
		for (g=0; g<1000; ++g) if (g!=f) {
"		+f%d(j)\n"
			, g);
	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

Expected Results:  No complaint.

Compiling the large .c file takes about 1 hour.
Comment 1 Jakub Jelinek 2001-04-25 11:46:17 EDT
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 13:03:42 EDT
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

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