Mercury Bugs - mercury
View Issue Details
0000492mercuryBugpublic2020-01-13 18:412020-01-18 22:23
Reporterjuliensf 
Assigned Tojuliensf 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Platformx86_64OSFedoraOS Version31
Product Version 
Target VersionFixed in Version 
Summary0000492: make install fails with GCC internal error on Fedora 31
DescriptionThe 'make install' step fails for 20.01-beta-2020-01-12 on Fedora 31 with the following message when attempting to build the library in the asm_fast.gc.debug.stseg grade. The GCC version is 9.2.1.

mmc --compile-to-c --grade asm_fast.gc.debug.stseg --mercury-linkage shared --flags LIB_FLAGS --flags INTER_FLAGS -R/home/juliensf/mercury-20.01-beta-2020-01-12/lib/mercury/lib/asm_fast.gc.debug.stseg -R/home/juliensf/mercury-20.01-beta-2020-01-12/lib/mercury/lib hash_table > hash_table.err 2>&1
/home/juliensf/mercury-srcdist-20.01-beta-2020-01-12/install_grade_dir.asm_fast.gc.debug.stseg/scripts/mgnuc --grade asm_fast.gc.debug.stseg -- -c hash_table.c -o hash_table.o
hash_table.c: In function ‘hash_table_module45’:
hash_table.c:11468:1: error: unable to generate reloads for:
(insn 498 497 499 32 (parallel [
            (set (reg/v:DI 43 r15 [ MR_mr3 ])
                (ashift:DI (reg/v:DI 42 r14 [ MR_mr2 ])
                    (const_int 31 [0x1f])))
            (clobber (reg:CC 17 flags))
        ]) "hash_table.c":11443:33 520 {*ashldi3_1}
     (expr_list:REG_UNUSED (reg:CC 17 flags)
        (nil)))
during RTL pass: reload
hash_table.c:11468:1: internal compiler error: in curr_insn_transform, at lra-constraints.c:3962
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccOvGbry.out file, please attach this to your bugreport.
gmake[2]: *** [/tmp/mmake.kZqh3s:89984: hash_table.o] Error 1
TagsNo tags attached.
Attached Files

Notes
(0001065)
wangp   
2020-01-13 19:54   
I previously reported it here:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91430
(0001066)
juliensf   
2020-01-13 20:05   
Do you know if there is a workaround we can use for it?
(0001067)
wangp   
2020-01-13 20:52   
Unfortunately, no.
(0001068)
juliensf   
2020-01-15 14:42   
Also, occurs with Alpine Linux 3.11 (GCC 9.2). I think we will just need to force GCC to use -O0 in debug grades with GCC 9.1 and 9.2. (The bug only seems to be triggered in debug grades.)
(0001069)
juliensf   
2020-01-18 22:23   
We now force the use of gcc -O0 in debug grades with GCC 9.
(Confirmed that installation of the source distribution works with
both Fedora 31 and Alpine Linux 3.11 out of the box.)

Issue History
2020-01-13 18:41juliensfNew Issue
2020-01-13 19:54wangpNote Added: 0001065
2020-01-13 20:05juliensfNote Added: 0001066
2020-01-13 20:52wangpNote Added: 0001067
2020-01-15 14:42juliensfNote Added: 0001068
2020-01-18 22:23juliensfAssigned To => juliensf
2020-01-18 22:23juliensfStatusnew => resolved
2020-01-18 22:23juliensfResolutionopen => fixed
2020-01-18 22:23juliensfNote Added: 0001069