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

--- Comment #8 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
With:

  if (tmp_symtree)
    {
      if (tmp_symtree->n.sym && tmp_symtree->n.sym->module
          && strcmp (modname, tmp_symtree->n.sym->module) == 0)
        return;
      gfc_error ("Symbol %qs at %C already declared", name);
      return;
    }

We now get:

$ gfc -c pr71649.f90 
pr71649.f90:3:7:

    USE ISO_FORTRAN_ENV, ONLY : Compiler_Version, Compiler_Options
       1
Error: Symbol ‘compiler_options’ at (1) already declared
pr71649.f90:12:29:

    Options = Compiler_Options()
                             1
Error: Unexpected use of subroutine name ‘compiler_options’ at (1)

Which now makes sense.

Reply via email to