Bug 46147 - g++ segfault compiling gnat 0.8.8 on mips-linux n32 and -fvisibility-inlines-hidden -fPIC -march=loongson2f
Summary: g++ segfault compiling gnat 0.8.8 on mips-linux n32 and -fvisibility-inlines-...
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.5.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, visibility
Depends on:
Blocks: visibility
  Show dependency treegraph
 
Reported: 2010-10-23 13:36 UTC by Lluís Batlle i Rossell
Modified: 2021-09-17 00:10 UTC (History)
1 user (show)

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


Attachments
The preprocessed source causing the trouble. (351.42 KB, application/octet-stream)
2010-10-23 13:36 UTC, Lluís Batlle i Rossell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lluís Batlle i Rossell 2010-10-23 13:36:48 UTC
Created attachment 22132 [details]
The preprocessed source causing the trouble.

At the middle of building gnat 0.8.8 (with boost 1.44.0) g++ dies with an internal error related to a segmentation fault.

I'm using gcc 4.5.1 with glibc 2.12.1 in a mips64-linux running n32 userland code, and binutils from a snapshot of the end of august (for the loongson2f fix).

The gcc is built, as a special flag, with --with-arch=loongson2f.

I attach the preprocessed file that triggers the error. Compile the file with the same flags the gnash build system decided:
g++ -g -O2 -fvisibility-inlines-hidden -fPIC -c
Removing only "-fPIC", the problem goes away. Using "-O0" instead, also makes the problem go away. Removing only "-fvisibility-inlines-hidden" also makes the problem go away.

The system has 1GiB of RAM, and monitoring with 'top', I see g++ never goes beyond 300MiB.
Comment 1 Paolo Carlini 2012-10-05 13:58:59 UTC
CC-ing mips maintainers.