This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30239] duplicate data type assignment not detected
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Dec 2006 20:15:56 -0000
- Subject: [Bug fortran/30239] duplicate data type assignment not detected
- References: <bug-30239-13648@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2006-12-17 20:15 -------
This is because in symbol.c's gfc_add_type there is
const char *msg = "Symbol '%s' at %L already has basic type of %s";
if (!(sym->ts.type == ts->typesym->ts.type == ts->type
&& (sym->attr.flavor == FL_PROCEDURE || sym->attr.result))
|| gfc_notification_std (GFC_STD_GNU) == ERROR
|| pedantic)
{
gfc_error (msg, sym->name, where, gfc_basic_typename (sym->ts.type));
return FAILURE;
}
The !(sym->ts.type == ts->type) prevents the error message. Removing this check
should all what is needed for this bug.
But this might break other cases were it is allowed. (I didn't check/though
about those, however).
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-12-17 20:15:55
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30239