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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|fortran                     |tree-optimization

--- Comment #5 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Just for completeness' sake, here is a C testcase. Needs -fcx-fortran-rules
to fail.

#include <complex.h>

double complex pr69155(double complex a, double complex b)
{
  if (cimag(a) < 10)
    {
      while (creal(a) < 10)
        {
          b = b - 1/a;
          a = a + 1;
        }
    }
  return a+b;
}

ig25@linux-fd1f:/tmp> gcc -fcx-fortran-rules -O c.c
c.c: In Funktion »pr69155«:
c.c:3:16: interner Compiler-Fehler: Speicherzugriffsfehler
 double complex pr69155(double complex a, double complex b)
                ^~~~~~~

0xb473bf crash_signal
        ../../trunk/gcc/toplev.c:334
0x8e8b15 gimple_stmt_nonnegative_warnv_p(gimple*, bool*, int)
        ../../trunk/gcc/gimple-fold.c:6260
...

Reply via email to