diff options
author | Andre Vehreschild <vehre@gcc.gnu.org> | 2017-02-19 19:43:49 +0100 |
---|---|---|
committer | Andre Vehreschild <vehre@gcc.gnu.org> | 2017-02-19 19:43:49 +0100 |
commit | 4ca4d1e95e39d256095f8274d8dd0d04aed603da (patch) | |
tree | bb58e020c2ac474097b535a37750596b6616dbf1 /gcc/testsuite/gfortran.dg | |
parent | dea71ad06f751484f3eb5c52bf12622e4c06b33a (diff) | |
download | gcc-4ca4d1e95e39d256095f8274d8dd0d04aed603da.zip gcc-4ca4d1e95e39d256095f8274d8dd0d04aed603da.tar.gz gcc-4ca4d1e95e39d256095f8274d8dd0d04aed603da.tar.bz2 |
re PR fortran/79229 (ICE in gfc_trans_assignment_1 with -fcheck=mem)
gcc/testsuite/ChangeLog:
2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/79229
* gfortran.dg/class_allocate_24.f90: New test.
gcc/fortran/ChangeLog:
2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/79229
* trans-expr.c (gfc_trans_assignment_1): Deref indirect refs when
compiling with -fcheck=mem to check the pointer and not the data.
From-SVN: r245581
Diffstat (limited to 'gcc/testsuite/gfortran.dg')
-rw-r--r-- | gcc/testsuite/gfortran.dg/class_allocate_24.f90 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/class_allocate_24.f90 b/gcc/testsuite/gfortran.dg/class_allocate_24.f90 new file mode 100644 index 0000000..883247d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/class_allocate_24.f90 @@ -0,0 +1,16 @@ +! { dg-do compile } +! { dg-options "-fcheck=mem" } +! +! Compile time check only, to test that the ICE is fixed in the assignment of the +! default initializer of the class to sf. + +implicit none + +type :: t + integer, pointer :: data => null () +end type + +class(t), dimension(:), allocatable :: sf +allocate (t :: sf (1)) +end + |