https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82333
Bug ID: 82333 Summary: [8 Regression] powerpc64le _Float128 ICE in as_a, at machmode.h:345 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: jsm28 at gcc dot gnu.org Target Milestone: --- Target: powerpc64le-linux-gnu The following code, compiled with -O2 for powerpc64le-linux-gnu, produces the following ICE. This is a regression from GCC 7 (note you need -mfloat128 to build with older compilers), reduced from glibc test-tgmath3, and probably postdates the change to enable _Float128 support by default for powerpc64le (since the glibc test built before then, then glibc build for powerpc64le was broken for a while, and by the time it was fixed this ICE appeared). Note, you need both the _Complex long double functions and the apparently independent _Complex _Float128 functions for this ICE to appear. _Complex long double vld; _Complex _Float128 vf128; _Complex long double fld (_Complex long double arg0) { return 0; } _Complex _Float128 ff128 (_Complex _Float128 arg0) { return 0; } void tld (void) { vld = fld (vld); } void tf128 (void) { vf128 = ff128 (vf128); } during RTL pass: expand test-tgmath3.i: In function 'tf128': test-tgmath3.i:25:9: internal compiler error: in as_a, at machmode.h:345 vf128 = ff128 (vf128); ~~~~~~^~~~~~~~~~~~~~~ 0x839dec scalar_mode as_a<scalar_mode>(machine_mode) /scratch/jmyers/glibc/many8/src/gcc/gcc/machmode.h:345 0x839dec convert_mode_scalar /scratch/jmyers/glibc/many8/src/gcc/gcc/expr.c:281 0x839dec convert_move(rtx_def*, rtx_def*, int) /scratch/jmyers/glibc/many8/src/gcc/gcc/expr.c:271 0x84091e store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool, tree_node*) /scratch/jmyers/glibc/many8/src/gcc/gcc/expr.c:5628 0x8424f0 expand_assignment(tree_node*, tree_node*, bool) /scratch/jmyers/glibc/many8/src/gcc/gcc/expr.c:5319 0x71ff95 expand_gimple_stmt_1 /scratch/jmyers/glibc/many8/src/gcc/gcc/cfgexpand.c:3655 0x71ff95 expand_gimple_stmt /scratch/jmyers/glibc/many8/src/gcc/gcc/cfgexpand.c:3751 0x722796 expand_gimple_basic_block /scratch/jmyers/glibc/many8/src/gcc/gcc/cfgexpand.c:5750 0x7281a6 execute /scratch/jmyers/glibc/many8/src/gcc/gcc/cfgexpand.c:6357 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.