Bug 52310 - Internal Compiler Error when building lesstif with -Wp,-D_FORTIFY_SOURCE=2
Summary: Internal Compiler Error when building lesstif with -Wp,-D_FORTIFY_SOURCE=2
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.6.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-19 17:20 UTC by Pascal Terjan
Modified: 2012-02-19 20:24 UTC (History)
1 user (show)

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


Attachments
Preprocessed source (79.77 KB, text/x-csrc)
2012-02-19 17:20 UTC, Pascal Terjan
Details
Reduce source code leading to the crash (795 bytes, text/plain)
2012-02-19 20:23 UTC, Pascal Terjan
Details
Preprocessed code for the minimal code (51.32 KB, text/plain)
2012-02-19 20:23 UTC, Pascal Terjan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Terjan 2012-02-19 17:20:11 UTC
Created attachment 26701 [details]
Preprocessed source

[pterjan@jonund Xm-2.1]$ gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include/Motif-2.1 -I../../include/Motif-2.1 -I/usr/include -I/usr/include -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -DMWM_DDIR=\"/usr/share/X11/mwm\" -c XmString.c  -fPIC -DPIC -o .libs/XmString.o
{standard input}: Assembler messages:
{standard input}: Warning: end of file not at end of a line; newline inserted
{standard input}:2041: Error: unbalanced parenthesis in operand 2.
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
gcc: internal compiler error: Segmentation fault (program cc1)

I attached the preprocessed source, it crashes here (x86_64) when using gcc -g -c XmStringE.c with gcc-4.6.2

This preprocessed source builds fine using gcc-4.5.1 (even if it gives a lot of warning about casting pointers to int).
Comment 1 Pascal Terjan 2012-02-19 20:23:15 UTC
Created attachment 26703 [details]
Reduce source code leading to the crash

Here is the minimal code I managed to trigger the crash
Comment 2 Pascal Terjan 2012-02-19 20:23:58 UTC
Created attachment 26704 [details]
Preprocessed code for the minimal code
Comment 3 Jakub Jelinek 2012-02-19 20:24:18 UTC
Dup of PR51077.