https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70457
Bug ID: 70457 Summary: ICE (segfault) in gimple_expand_builtin_pow on powerpc64le-linux-gnu Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: doko at gcc dot gnu.org Target Milestone: --- fails in 4.8 up to 6, works with -O2 $ gcc -c -O3 math.i math.i: In function 'P_Pow': math.i:26:8: internal compiler error: Segmentation fault Object P_Pow (Object x, Object y) { return General_Function (x, y, pow); } ^ 0x102bde83 crash_signal ../../src/gcc/toplev.c:383 0x1031d914 gimple_expand_builtin_pow ../../src/gcc/tree-ssa-math-opts.c:1169 0x10a42827 execute ../../src/gcc/tree-ssa-math-opts.c:1517 Please submit a full bug report, with preprocessed source if appropriate. $ cat math.i extern double pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__ , __leaf__)); typedef int int64_t __attribute__ ((__mode__ (__DI__))); typedef struct { int64_t data; int tag; } Object; extern Object Make_Flonum (double); extern Object P_Pow (Object, Object); Object General_Function (Object x, Object y, double (*fun)()) { double d, ret; d = 1.0; if (y.tag >> 1) ret = (*fun) (d); else ret = (*fun) (d, 0.0); return Make_Flonum (ret); } Object P_Pow (Object x, Object y) { return General_Function (x, y, pow); }