Bug 57122 - Internal error: Segmentation fault (program cpp0)
Summary: Internal error: Segmentation fault (program cpp0)
Keywords:
Status: CLOSED DUPLICATE of bug 54380
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.2
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-12-05 09:49 UTC by Sysoltsev Slawa
Modified: 2007-04-18 16:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-12-05 09:52:09 UTC
Embargoed:


Attachments (Terms of Use)
source file needed to reproduce bug (78 bytes, text/plain)
2001-12-05 09:51 UTC, Sysoltsev Slawa
no flags Details
Core dump (136.00 KB, application/octet-stream)
2001-12-05 09:52 UTC, Sysoltsev Slawa
no flags Details

Description Sysoltsev Slawa 2001-12-05 09:49:45 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Description of problem:
gcc crashes with segmentation fault when i try to compile C source file 
with certain error.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. command line:  gcc -D'MD5Name(x)=#Broken##x' test.c

test.c:
#include <stdio.h>
int main ()
{
    printf (MD5Name(SLAWA));
    return 0;
}


Actual Results:  gcc emits diagnostics:
<command line>: '#' is not followed by a macro parameter
gcc: Internal error: Segmentation fault (program cpp0)
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.

gcc also creates core dump in current directory

Expected Results:  compile-time error

Additional info:

I will try to attach core dump and test.c files

Comment 1 Sysoltsev Slawa 2001-12-05 09:51:19 UTC
Created attachment 39690 [details]
source file needed to reproduce bug

Comment 2 Sysoltsev Slawa 2001-12-05 09:52:05 UTC
Created attachment 39691 [details]
Core dump

Comment 3 Jakub Jelinek 2001-12-18 13:05:34 UTC
The ICE was fixed in gcc-2.96-100, though the warning is correct,
such argument is bogus.
If you want to stringify the whole thing (which I belive because you're passing
it to printf), then it should be
gcc -D'MD5Name(x)="Broken" #x' test.c

*** This bug has been marked as a duplicate of 54380 ***


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