diff options
author | Francois-Xavier Coudert <coudert@clipper.ens.fr> | 2006-10-02 11:21:45 +0200 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2006-10-02 09:21:45 +0000 |
commit | e227ac577f38755f5852702025eb6d504d051880 (patch) | |
tree | a1ab6578a128011188d1b1644438d31a6ebebdc4 /gcc/fortran | |
parent | 82181741c1deec0c06b7df21d7ec51781536ec12 (diff) | |
download | gcc-e227ac577f38755f5852702025eb6d504d051880.zip gcc-e227ac577f38755f5852702025eb6d504d051880.tar.gz gcc-e227ac577f38755f5852702025eb6d504d051880.tar.bz2 |
re PR fortran/29210 ([4.1 only] Name parameter in complex constant not allowed in F95)
PR fortran/29210
* primary.c (match_sym_complex_part): Named constants as real or
imaginary part of complex a named constant are only allowed in
Fortran 2003.
* gfortran.dg/complex_parameter_1.f90: New test.
From-SVN: r117368
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/primary.c | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index ff1f55e..e574f18 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2006-10-02 Francois-Xavier Coudert <coudert@clipper.ens.fr> + + PR fortran/29210 + * primary.c (match_sym_complex_part): Named constants as real or + imaginary part of complex a named constant are only allowed in + Fortran 2003. + 2006-10-01 Brooks Moses <bmoses@stanford.edu> * gfortran.texi: Corrected references to MALLOC intrinsic. diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index 6f61ad7..7adc908 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -1084,6 +1084,10 @@ match_sym_complex_part (gfc_expr ** result) return MATCH_ERROR; } + if (gfc_notify_std (GFC_STD_F2003, "Fortran 2003: PARAMETER symbol in " + "complex constant at %C") == FAILURE) + return MATCH_ERROR; + switch (sym->value->ts.type) { case BT_REAL: |