2019-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91296
* interface.c (compare_actual_expr): When checking for aliasing, add
a case to handle REF_INQUIRY (e.g., foo(x%re, x%im) do not alias).
2019-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/91296
* gfortran.dg/pr91296.f90: New test.
From-SVN: r273914
+2019-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91296
+ * interface.c (compare_actual_expr): When checking for aliasing, add
+ a case to handle REF_INQUIRY (e.g., foo(x%re, x%im) do not alias).
+
2019-07-29 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/90813
case REF_SUBSTRING:
return false;
+ case REF_INQUIRY:
+ if (e1->symtree->n.sym->ts.type == BT_COMPLEX
+ && e1->ts.type == BT_REAL && e2->ts.type == BT_REAL
+ && r1->u.i != r2->u.i)
+ return false;
+ break;
+
default:
gfc_internal_error ("compare_actual_expr(): Bad component code");
}
+2019-07-30 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/91296
+ * gfortran.dg/pr91296.f90: New test.
+
2019-07-30 Martin Liska <mliska@suse.cz>
PR tree-optimization/91270
--- /dev/null
+! { dg-do compile }
+! { dg-options "-Waliasing" }
+! PR fortran/91296
+! Code contributed by Chinoune Mehdi <chinoune dot medhi at hotmail dot com>
+module m
+ implicit none
+ integer, parameter :: sp = selected_real_kind(6)
+
+contains
+ pure subroutine s(a,b,c)
+ real(sp), intent(in) :: a, b
+ real(sp), intent(out) :: c
+ c = a + b
+ end subroutine s
+end module m
+
+program test
+ use m
+ implicit none
+ real(sp) :: a
+ complex(sp) :: c
+
+ c = (1._sp,1._sp)
+ call s(c%re,c%im,a) ! *** This use to cause an ICE. ***
+ print*,a
+
+end program test