This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/68950] [fortran] gfc_format_decoder cannot handle %qE
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 17 Dec 2015 07:36:42 +0000
- Subject: [Bug fortran/68950] [fortran] gfc_format_decoder cannot handle %qE
- Auto-submitted: auto-generated
- References: <bug-68950-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68950
--- Comment #2 from vries at gcc dot gnu.org ---
Using this patch:
...
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 8c4fa03..2669bf2 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -2097,7 +2097,9 @@ build_function_decl (gfc_symbol * sym, bool global)
TREE_USED (fndecl) = 1;
attributes = add_attributes_to_decl (attr, NULL_TREE);
+ gfc_diagnostics_finish ();
decl_attributes (&fndecl, attributes, 0);
+ gfc_diagnostics_init ();
/* Figure out the return type of the declared function, and build a
RESULT_DECL for it. If this is a subroutine with alternate
...
I avoid the assert, and get the error message:
...
src/gcc/testsuite/gfortran.dg/goacc/routine-4.f90:151:0: Error: wrong number of
arguments specified for âoacc functionâ attribute
src/gcc/testsuite/gfortran.dg/goacc/routine-4.f90:141:0: Error: wrong number of
arguments specified for âoacc functionâ attribute
src/gcc/testsuite/gfortran.dg/goacc/routine-4.f90:131:0: Error: wrong number of
arguments specified for âoacc functionâ attribute
src/gcc/testsuite/gfortran.dg/goacc/routine-4.f90:121:0: Error: wrong number of
arguments specified for âoacc functionâ attribute
...