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/51308] PARAMETER attribute conflicts with SAVE attribute
Date: Mon, 28 Nov 2011 09:35:00 -0000 [thread overview]
Message-ID: <bug-51308-4-MShBewwXKq@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-51308-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51308
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-11-28 07:51:02 UTC ---
(In reply to comment #2)
> - conf2 (is_bind_c);
> + if (!(name && (strcmp(name, "c_null_ptr") == 0 || strcmp(name,
> "c_null_funptr") == 0)))
> + conf2 (is_bind_c);
I think one should use "if (!is_iso_c)". And why do you keep the save
attribute? I think the following should work as well.
(Actually, reading it again, the "Set up the symbol's important fields." is not
really a useful comment - and could thus go.)
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -744,5 +744,6 @@ check_conflict (symbol_attribute *attr, const char *name,
locus *where)
conf2 (value);
- conf2 (is_bind_c);
conf2 (codimension);
conf2 (result);
+ if (!attr->is_iso_c)
+ conf2 (is_bind_c);
break;
@@ -3765,5 +3766,3 @@ gen_special_c_interop_ptr (int ptr_id, const char
- /* Set up the symbol's important fields. Save attr required so we can
- initialize the ptr to NULL. */
- tmp_sym->attr.save = SAVE_EXPLICIT;
+ /* Set up the symbol's important fields. */
tmp_sym->ts.is_c_interop = 1;
@@ -3772,2 +3771,3 @@ gen_special_c_interop_ptr (int ptr_id, const char
tmp_sym->ts.type = BT_DERIVED;
+ tmp_sym->attr.flavor = FL_PARAMETER;
@@ -3819,5 +3819,2 @@ gen_special_c_interop_ptr (int ptr_id, const char
c->expr->ts.is_iso_c = 1;
- /* Must declare c_null_ptr and c_null_funptr as having the
- PARAMETER attribute so they can be used in init expressions. */
- tmp_sym->attr.flavor = FL_PARAMETER;
next prev parent reply other threads:[~2011-11-28 7:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-26 9:24 [Bug fortran/51308] New: " matthias.moeller at math dot tu-dortmund.de
2011-11-26 20:50 ` [Bug fortran/51308] " kargl at gcc dot gnu.org
2011-11-27 22:14 ` sgk at troutmask dot apl.washington.edu
2011-11-28 9:35 ` burnus at gcc dot gnu.org [this message]
2011-11-28 14:22 ` sgk at troutmask dot apl.washington.edu
2011-11-28 14:24 ` burnus at gcc dot gnu.org
2011-11-28 14:28 ` burnus at gcc dot gnu.org
2011-11-28 14:38 ` burnus at gcc dot gnu.org
2011-11-28 15:17 ` 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-51308-4-MShBewwXKq@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).