Bug 38358 - Could not compile gcc using large include files
Summary: Could not compile gcc using large include files
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.1.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-02 00:01 UTC by LJ
Modified: 2008-12-02 13:07 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LJ 2008-12-02 00:01:35 UTC
I am trying to compile a typical c file with include option turned on. The include option includes .h file as part of the array element declaration for the c file.

When I did compile:-

gcc c.c -include myfile.h -D STS
In file included from /usr/include/sys/cdefs.h:0,
                 from /usr/include/features.h:33,
                 from /usr/include/stdio.h:9,
                 from c.c:19:
/usr/include/bits/wordsize.h:1: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.

I have checked the c.c:19 and they are commentation without any code before and after that line. My exact code only starts at line 40. I included the same .h file but with smaller size of .h file. It works perfectly and compilable.This file size is around 1-2MB. But the previous .h file which gives the above error has 1GB of file size.

Is this a bug or do i need to specify any extra options to handle this special case?


Please advise.


Thanks.
Comment 1 Andrew Pinski 2008-12-02 00:03:34 UTC
Did you see:
See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.

??
Comment 2 LJ 2008-12-02 00:26:17 UTC
(In reply to comment #1)
> Did you see:
> See <URL:http://bugzilla.redhat.com/bugzilla> for instructions.
> 
> ??
> 

Yes. I am using Debian and I could not find any suitable class to lodge a bug report under RedHat bugzilla. I figured it out that this is the closest match.
Comment 3 Andrew Pinski 2008-12-02 00:29:01 UTC
Wait how are you using debain but using Redhat's modified GCC ?
Comment 4 Richard Biener 2008-12-02 11:10:21 UTC
If you are having a large array initializer you may run into memory problems
and/or internal limitations.  Without a testcase it's hard to tell.
Comment 5 LJ 2008-12-02 13:07:53 UTC
Hi,

Thanks for your prompt reply.

Is there any suggestion or workaround in this case in order for gcc to compile it successfully?

I would have think its not wise to attach quite a big file over the email.

Please advise. Thanks.



(In reply to comment #4)
> If you are having a large array initializer you may run into memory problems
> and/or internal limitations.  Without a testcase it's hard to tell.
>