summaryrefslogtreecommitdiff
path: root/gcc/fortran/primary.c
diff options
context:
space:
mode:
authortkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-30 17:48:27 +0000
committertkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2016-10-30 17:48:27 +0000
commita57f28d28f972e8befb2d30cca475963afebe269 (patch)
tree9f87be3a5ce110418b89e042a1508d940257fa15 /gcc/fortran/primary.c
parente32de7baeb35e1b8794c8d6596bd218d6ef39504 (diff)
downloadgcc-a57f28d28f972e8befb2d30cca475963afebe269.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241689 138bc75d-0d04-0410-961f-82ee72b054a4
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 bcbaeaa6369..2101644fcdc 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;