Bug 7150 - gcc -dM -E ... SegFault
gcc -dM -E ... SegFault
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: preprocessor
3.2
: P3 normal
: ---
Assigned To: Neil Booth
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2002-06-28 01:06 UTC by joel.soete
Modified: 2003-07-25 17:33 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 joel.soete 2002-06-28 01:06:00 UTC
In the continuity of PR: c/7138: gcc-3.2 failed to compile kernel, I try to have a look in the preprocessor output with -dM -E option which do "Segmentation Fault" as follow:

palx2000:/Develop/parisc-linux/src/linux/arch/parisc/kernel# gcc -dM -E -D__ASSEMBLY__ -traditional -D__KERNEL__ -I/Develop/parisc-linux/src/linux/include  -c -o pacache.CPP pacache.S
In file included from /Develop/parisc-linux/src/linux/include/asm/assembly.h:31,
                 from pacache.S:44:
/Develop/parisc-linux/src/linux/include/asm/offset.h:3: unterminated #ifndef
cc1: internal compiler error: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Here is also some additional more expert comment:
"The '-c' shouldn't be there but cc1 shouldn't ICE on an unterminated #ifdef.
Is the #ifdef actually unterminated?  Would you file a PR on this one as
well?

I'm also seeing a problem with the preprocessor on the vax :(

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

"

Thanks in advance for additional attention,
    Joel

Release:
gcc-3.2 (snapshot)

Environment:
parisc-linux
Comment 1 Neil Booth 2002-06-28 17:38:17 UTC
From: Neil Booth <neil@daikokuya.co.uk>
To: joel.soete@freebel.net
Cc: gcc-gnats@gcc.gnu.org, John David Anglin <dave@hiauly1.hia.nrc.ca>
Subject: Re: c/7150: gcc -dM -E ... SegFault
Date: Fri, 28 Jun 2002 17:38:17 +0100

 joel.soete@freebel.net wrote:-
 
 > In the continuity of PR: c/7138: gcc-3.2 failed to compile kernel, I try to have a look in the preprocessor output with -dM -E option which do "Segmentation Fault" as follow:
 > 
 > palx2000:/Develop/parisc-linux/src/linux/arch/parisc/kernel# gcc -dM -E -D__ASSEMBLY__ -traditional -D__KERNEL__ -I/Develop/parisc-linux/src/linux/include  -c -o pacache.CPP pacache.S
 > In file included from /Develop/parisc-linux/src/linux/include/asm/assembly.h:31,
 >                  from pacache.S:44:
 > /Develop/parisc-linux/src/linux/include/asm/offset.h:3: unterminated #ifndef
 > cc1: internal compiler error: internal error: Segmentation fault
 > Please submit a full bug report,
 > with preprocessed source if appropriate.
 > See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
 
 Thanks, but I need a testcase to have a hope of fixing it.
 
 Neil.
Comment 2 Neil Booth 2002-06-29 07:15:46 UTC
Responsible-Changed-From-To: unassigned->neil
Responsible-Changed-Why: Testing a fix.
Comment 3 Neil Booth 2002-06-29 07:15:46 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: Reproduced.
Comment 4 Neil Booth 2002-06-29 08:49:43 UTC
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed.
Comment 5 Neil Booth 2002-06-29 15:49:34 UTC
From: neil@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: preprocessor/7150
Date: 29 Jun 2002 15:49:34 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	neil@gcc.gnu.org	2002-06-29 08:49:34
 
 Modified files:
 	gcc            : cppmain.c ChangeLog 
 
 Log message:
 	PR preprocessor/7150
 	* cppmain.c (scan_translation_unit_trad): Simplify.
 	* cpplib.c (cpp_scan_nooutput): Handle traditional case.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cppmain.c.diff?cvsroot=gcc&r1=1.100&r2=1.101
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=1.14734&r2=1.14735