aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2017-12-28 20:49:12 +0200
committerJanne Blomqvist <jb@gcc.gnu.org>2017-12-28 20:49:12 +0200
commit208413c7b4d3a2360ba4864f00ceaf720b4f67c7 (patch)
tree580b1b983ec82b840b86649b556573849f117aa4 /gcc/testsuite
parent9fd8313a89d1c76b3f204b33c854e3cdc4b5a2d7 (diff)
downloadgcc-208413c7b4d3a2360ba4864f00ceaf720b4f67c7.zip
gcc-208413c7b4d3a2360ba4864f00ceaf720b4f67c7.tar.gz
gcc-208413c7b4d3a2360ba4864f00ceaf720b4f67c7.tar.bz2
PR fortran/83344 Don't set bogus constant value
This patch does not fix PR 83344, but merely fixes an error where we used to set a constant character length value from a non-constant expression, and thus set it to some bogus value. As a result of this, I have commented out part of the associate_22.f90 test which otherwise generates a warning message. Regtested on x86_64-pc-linux-gnu. gcc/fortran/ChangeLog: 2017-12-28 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/83344 * resolve.c (resolve_assoc_var): Don't set the constant value unless the target is a constant expression. gcc/testsuite/ChangeLog: 2017-12-28 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/83344 * gfortran.dg/associate_22.f90: Comment out part of test. From-SVN: r256021
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gfortran.dg/associate_22.f909
2 files changed, 11 insertions, 5 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2e69175..1e91e7f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,9 +1,14 @@
+2017-12-28 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR fortran/83344
+ * gfortran.dg/associate_22.f90: Comment out part of test.
+
2017-12-28 Paul Thomas <pault@gcc.gnu.org>
PR fortran/83567
* gfortran.dg/pdt_26.f90 : New test.
-2017_12_27 Louis Krupp <louis.krupp@zoho.com>
+2017-12-27 Louis Krupp <louis.krupp@zoho.com>
PR fortran/83092
* gfortran.dg/init_char_with_nonchar_ctr.f90: New test.
diff --git a/gcc/testsuite/gfortran.dg/associate_22.f90 b/gcc/testsuite/gfortran.dg/associate_22.f90
index 1558992..edf5932 100644
--- a/gcc/testsuite/gfortran.dg/associate_22.f90
+++ b/gcc/testsuite/gfortran.dg/associate_22.f90
@@ -24,10 +24,11 @@ program foo
end associate
! This failed.
- a = trim(s) // 'abc'
- associate(w => trim(s) // 'abc')
- if (trim(w) /= trim(a)) call abort
- end associate
+ ! This still doesn't work correctly, see PR 83344
+! a = trim(s) // 'abc'
+! associate(w => trim(s) // 'abc')
+! if (trim(w) /= trim(a)) call abort
+! end associate
! This failed.
associate(x => trim('abc'))