john o goyo <jog37@riddermarkfarm.ca> writes:
Greetings, Gaius.
Here is an oddity:
[~/opt/gm2/testsuite]=> gm2-14 -c -O -fomit-frame-pointer
-finline-functions -fiso packed.mod
[~/opt/gm2/testsuite]=> gm2-14 -c -O0 -fomit-frame-pointer
-finline-functions -fiso packed.mod
[~/opt/gm2/testsuite]=> gm2-14 -c -O1 -fomit-frame-pointer
-finline-functions -fiso packed.mod
[~/opt/gm2/testsuite]=> gm2-14 -c -O2 -fomit-frame-pointer
-finline-functions -fiso packed.mod
gm2: internal compiler error: Segmentation Fault signal terminated
program cc1gm2
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
[~/opt/gm2/testsuite]=> gm2-14 -c -Ofast -fomit-frame-pointer
-finline-functions -fiso packed.mod
gm2: internal compiler error: Segmentation Fault signal terminated
program cc1gm2
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
Basically, optimisation level 2 and above causes problems.
I am trying to chase down the problem but I have clue where the gm2
compilation starts. Please inform me on which function to break.
Sincerely,
john
Hi John,
that is an interesting observation.
One way to debug is to set a break point on: gimplify_function_tree(tree_node*)
which is called by the front end at each end of function when the
statement tree is complete. The statement tree can be dumped as follows
below. For small test programs this can be useful - even to see which
function causes the sigsegv. You can also dump the gimple IR via
command line -fm2-dump=all.