------- Comment #1 from burnus at gcc dot gnu dot org  2008-05-16 21:58 -------
And using

  bind(C) :: a

gives even an ICE. For PUBLIC and PRIVATE, see the patch below. "save" and
"value" are not needed they give already the error "Cannot change attributes of
USE-associated symbol a". (My hope was that one gets a better error message,
but one does not.) And similarly to value and save, the error is not printed
for BIND(C), but it still crashes at:
==5829==    by 0x45E283: gfc_verify_binding_labels (resolve.c:6616)


@@ -595,6 +612,15 @@ check_conflict (symbol_attribute *attr,
       conf2 (function);
       conf2 (subroutine);
       conf2 (threadprivate);
+      conf2 (value);
+      conf2 (save);
+      conf2 (is_bind_c);
+
+      if (attr->access != ACCESS_UNKNOWN)
+       {
+          a2 = attr->access == ACCESS_PRIVATE ? private : public;
+         goto conflict;
+       }
       break;

     case FL_VARIABLE:


-- 

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
           Keywords|                            |accepts-invalid, ice-on-
                   |                            |invalid-code
   Last reconfirmed|0000-00-00 00:00:00         |2008-05-16 21:58:47
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36251

Reply via email to