public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/45823] Bogus warning for intrinsic module procedures
Date: Thu, 12 May 2011 11:53:00 -0000 [thread overview]
Message-ID: <bug-45823-4-aJF6BSxXqr@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-45823-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45823
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-05-12 10:35:23 UTC ---
(In reply to comment #1)
> This bug basically makes the option -Wsurprising useless in combination with
> iso_fortran_env.
Well, you can still use ONLY - which is a decent work around, unless you really
need the two functions.
Regarding the test case from comment 0: resolve_intrinsic is called twice -
once from resolve_symbol (which sets then ts.type) and then again for
resolve_function; the second call to resolve_intrinsic generates then the
warning.
The following patch should work. It prevents the warning but if one tries to
modify the type, one gets the normal module warning:
Error: Symbol 'compiler_options' at (1) already has basic type of CHARACTER
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -1454,7 +1454,7 @@ resolve_intrinsic (gfc_symbol *sym, locus *loc)
if (isym)
{
if (sym->ts.type != BT_UNKNOWN && gfc_option.warn_surprising
- && !sym->attr.implicit_type)
+ && !sym->attr.implicit_type && !sym->from_intmod)
gfc_warning ("Type specified for intrinsic function '%s' at %L is"
" ignored", sym->name, &sym->declared_at);
next prev parent reply other threads:[~2011-05-12 11:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 23:34 [Bug fortran/45823] New: " burnus at gcc dot gnu.org
2011-05-12 11:53 ` burnus at gcc dot gnu.org [this message]
2011-05-12 12:54 ` [Bug fortran/45823] " thenlich at users dot sourceforge.net
2011-05-12 18:35 ` burnus 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-45823-4-aJF6BSxXqr@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: link
Be 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).