public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/59107] [4.8/4.9/5 Regression] Spurious "Type specified for intrinsic function 'command_argument_count' at (1) is ignored" under -Wsurprising. Date: Thu, 22 Jan 2015 14:27:00 -0000 [thread overview] Message-ID: <bug-59107-4-WKXiRjIPpT@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-59107-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59107 --- Comment #11 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- Updated patch for 5.0 --- ../_clean/gcc/fortran/gfortran.h 2015-01-19 02:01:40.000000000 +0100 +++ gcc/fortran/gfortran.h 2015-01-22 11:42:56.000000000 +0100 @@ -1451,7 +1451,7 @@ typedef struct gfc_symbol /* Set if this variable is used as an index name in a FORALL. */ unsigned forall_index:1; /* Used to avoid multiple resolutions of a single symbol. */ - unsigned resolved:1; + unsigned resolve_symbol_called:2; int refs; struct gfc_namespace *ns; /* namespace containing this symbol */ --- ../_clean/gcc/fortran/resolve.c 2015-01-18 17:58:11.000000000 +0100 +++ gcc/fortran/resolve.c 2015-01-22 11:41:38.000000000 +0100 @@ -1625,8 +1625,9 @@ gfc_resolve_intrinsic (gfc_symbol *sym, gfc_intrinsic_sym* isym = NULL; const char* symstd; - if (sym->formal) + if (sym->resolve_symbol_called >= 2) return true; + sym->resolve_symbol_called = 2; /* Already resolved. */ if (sym->from_intmod && sym->ts.type != BT_UNKNOWN) @@ -6930,7 +6931,9 @@ resolve_allocate_expr (gfc_expr *e, gfc_ goto failure; } - if (code->ext.alloc.ts.type == BT_CHARACTER && !e->ts.deferred) + /* Check F08:C632. */ + if (code->ext.alloc.ts.type == BT_CHARACTER && !e->ts.deferred + && !UNLIMITED_POLY (e)) { int cmp = gfc_dep_compare_expr (e->ts.u.cl->length, code->ext.alloc.ts.u.cl->length); @@ -13082,9 +13085,9 @@ resolve_symbol (gfc_symbol *sym) gfc_array_spec *as; bool saved_specification_expr; - if (sym->resolved) + if (sym->resolve_symbol_called >= 1) return; - sym->resolved = 1; + sym->resolve_symbol_called = 1; if (sym->attr.artificial) return; It regtest cleanly. If it helps, I can take this PR.
next prev parent reply other threads:[~2015-01-22 14:27 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-11-13 9:33 [Bug fortran/59107] New: " mathewc at nag dot co.uk 2013-11-17 15:14 ` [Bug fortran/59107] " janus at gcc dot gnu.org 2013-11-17 15:30 ` janus at gcc dot gnu.org 2013-11-17 15:39 ` janus at gcc dot gnu.org 2013-11-17 15:51 ` janus at gcc dot gnu.org 2013-11-17 15:58 ` janus at gcc dot gnu.org 2013-11-17 16:02 ` janus at gcc dot gnu.org 2013-11-17 16:18 ` [Bug fortran/59107] [4.7/4.8/4.9 Regression] " janus at gcc dot gnu.org 2013-11-17 19:01 ` janus at gcc dot gnu.org 2013-11-19 9:50 ` rguenth at gcc dot gnu.org 2014-06-12 13:49 ` [Bug fortran/59107] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org 2014-12-19 13:34 ` [Bug fortran/59107] [4.8/4.9/5 " jakub at gcc dot gnu.org 2015-01-22 14:27 ` dominiq at lps dot ens.fr [this message] 2015-03-21 15:27 ` dominiq at lps dot ens.fr 2015-06-23 8:27 ` [Bug fortran/59107] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org 2015-06-26 20:02 ` [Bug fortran/59107] [4.9/5/6 " jakub at gcc dot gnu.org 2015-06-26 20:32 ` jakub at gcc dot gnu.org 2020-05-11 8:27 ` [Bug fortran/59107] [8/9/10/11 " cvs-commit at gcc dot gnu.org 2020-05-11 9:45 ` cvs-commit at gcc dot gnu.org 2020-05-11 11:38 ` cvs-commit at gcc dot gnu.org 2020-05-11 14:11 ` cvs-commit at gcc dot gnu.org 2020-05-11 14:12 ` markeggleston at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-59107-4-WKXiRjIPpT@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).