public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/104812] New: Construct-name with same variable name in scope
@ 2022-03-07  4:47 fruitclover at gmail dot com
  2022-03-07 15:22 ` [Bug fortran/104812] " kargl at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: fruitclover at gmail dot com @ 2022-03-07  4:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104812
           Summary: Construct-name with same variable name in scope
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fruitclover at gmail dot com
  Target Milestone: ---

Is this expected behavior for s1 to disallow construct-name with the same name
as declared variable? 

$ cat -n test.f90
     1  subroutine s1
     2    logical :: x
     3    x: if (x) then
     4    end if x
     5  end
     6  
     7  subroutine s2
     8    logical :: x
     9    x: block
    10    end block x
    11  end

$ gfortran test.f90 -fsyntax-only -Wall -Wextra
test.f90:3:11:

    3 |   x: if (x) then
      |           1
Error: Symbol at (1) is not appropriate for an expression
test.f90:4:5:

    4 |   end if x
      |     1
Error: Expecting END SUBROUTINE statement at (1)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-04-05 17:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-07  4:47 [Bug fortran/104812] New: Construct-name with same variable name in scope fruitclover at gmail dot com
2022-03-07 15:22 ` [Bug fortran/104812] " kargl at gcc dot gnu.org
2022-03-10 11:27 ` fruitclover at gmail dot com
2022-03-10 14:57 ` sgk at troutmask dot apl.washington.edu
2022-04-05 15:25 ` fruitclover at gmail dot com
2022-04-05 16:31 ` kargl at gcc dot gnu.org
2022-04-05 17:37 ` fruitclover at gmail dot com

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).