https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66695

--- Comment #7 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
gfc_verify_binding_labels seems strange.

First, I am not sure what to make of

/* Verify that any binding labels used in a given namespace do not collide
   with the names or binding labels of any global symbols.

As far as I read the standard, there is no harm in names
colliding - binding labels have their separate namespace.

The logic follows from the comment. 

For the subroutine s()  bind(C, name="f")

this

  gsym = gfc_find_case_gsymbol (gfc_gsym_root, sym->binding_label);

looks for a name, and

      if (!gsym)
        gsym = gfc_get_gsymbol (sym->binding_label);

creates it.

We would probably be better off putting the C binding
labels into a separate space.

Reply via email to