https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99127

--- Comment #5 from Kurt Miller <kurt at intricatesoftware dot com> ---
(In reply to Jakub Jelinek from comment #4)
> So, do you get the ICE with
> int c_pow_r_1, c_pow_r_0, c_pow_phase;
> 
> void
> c_pow() {
>   _Complex double r = __builtin_cexpi(c_pow_phase);
>   c_pow_r_0 = __real__ r;
>   c_pow_r_1 = __imag__ r;
> }
> too?

I made the following change to the 8.4.0 port:

Index: gcc/tree-ssa-math-opts.c
--- gcc/tree-ssa-math-opts.c.orig
+++ gcc/tree-ssa-math-opts.c
@@ -1922,7 +1922,11 @@ class pass_cse_sincos : public gimple_opt_pass (public
     {
       /* We no longer require either sincos or cexp, since powi expansion
         piggybacks on this pass.  */
+#if defined(__hppa__)
+      return false;
+#else
       return optimize;
+#endif
     }

   virtual unsigned int execute (function *);

I know this is not correct for cross compiling but I'm building native on hppa.
That change fixed the python builds but does not fix the reduced test case
above.

apoc$ egcc -c -O1 -o hppatest.o hppatest.c 
apoc$ 
apoc$ egcc -c -O1 -o pr99127.o pr99127.i   
during RTL pass: expand
pr99127.i: In function 'c_pow':
pr99127.i:5:23: internal compiler error: in expand_expr_addr_expr_1, at
expr.c:8026
   _Complex double r = __builtin_cexpi(c_pow_phase);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to