aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/primary.c
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2016-10-30 17:48:27 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2016-10-30 17:48:27 +0000
commit396e56d2da7935f96f4ca133c359668cc6c98eaf (patch)
tree9f87be3a5ce110418b89e042a1508d940257fa15 /gcc/fortran/primary.c
parente9d33505a09b5503ff8816ae970c47ce30684447 (diff)
downloadgcc-396e56d2da7935f96f4ca133c359668cc6c98eaf.zip
gcc-396e56d2da7935f96f4ca133c359668cc6c98eaf.tar.gz
gcc-396e56d2da7935f96f4ca133c359668cc6c98eaf.tar.bz2
re PR fortran/67219 (Incorrect conversion warning)
2016-10-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/67219 * arith.c (gfc_int2real): Change gfc_warning_now to gfc_warning. * primary.c (match_complex_constant): If there is no comma, throw away any warning which might have been issued by gfc_int2real. 2016-10-30 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/67219 * gfortran.dg/pr67219.f90: New test. From-SVN: r241689
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r--gcc/fortran/primary.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c
index bcbaeaa..2101644 100644
--- a/gcc/fortran/primary.c
+++ b/gcc/fortran/primary.c
@@ -1353,6 +1353,10 @@ match_complex_constant (gfc_expr **result)
if (gfc_match_char (',') == MATCH_NO)
{
+ /* It is possible that gfc_int2real issued a warning when
+ converting an integer to real. Throw this away here. */
+
+ gfc_clear_warning ();
gfc_pop_error (&old_error);
m = MATCH_NO;
goto cleanup;