Bug 57122 - Internal error: Segmentation fault (program cpp0)
Internal error: Segmentation fault (program cpp0)
Status: CLOSED DUPLICATE of bug 54380
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2001-12-05 04:49 EST by Sysoltsev Slawa
Modified: 2007-04-18 12:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-12-05 04:52:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Sysoltsev Slawa 2001-12-05 04:49:45 EST
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:

Steps to Reproduce:
1. command line:  gcc -D'MD5Name(x)=#Broken##x' 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 04:51:19 EST
Created attachment 39690 [details]
source file needed to reproduce bug
Comment 2 Sysoltsev Slawa 2001-12-05 04:52:05 EST
Created attachment 39691 [details]
Core dump
Comment 3 Jakub Jelinek 2001-12-18 08:05:34 EST
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.