public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/45608]  New: Bogus error about procedure attribute
@ 2010-09-09  4:39 jvdelisle at gcc dot gnu dot org
  2010-09-09  5:35 ` [Bug fortran/45608] " burnus at gcc dot gnu dot org
  0 siblings, 1 reply; 4+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-09-09  4:39 UTC (permalink / raw)
  To: gcc-bugs

This test case is invalid.  It is rejected with an error message that is
nonsense in this context.

program test

implicit none

type line_struct
  integer :: width = 10
end type

type symbol_struct
  integer :: typee = 10
end type

type curve_struct
  type (line_struct) line
  type (symbol_struct) symbol
end type

type (curve_struct) curve

namelist / params / curve

!

open (1, file = 'test.nml')
read (1, nml = params)
print *, curve(1)%symbol%typee

end program

$ gfc -g test.f90 
test.f90:20.17:

namelist / params / curve
                 1
Error: PROCEDURE attribute conflicts with NAMELIST attribute in 'curve' at (1)

Another example is:

program test2

implicit none

type line_struct
  integer :: width = 10
end type

type symbol_struct
  integer :: typee = 10
end type

type curve_struct
  type (line_struct) line
  type (symbol_struct) symbol
end type

type (curve_struct) curve

print *, curve(1)%symbol%typee

end program

$ gfc -g test2.f90 
/tmp/ccuBUha0.o: In function `test':
/home/jerry/prs/pr45532/pr45532.f90:20: undefined reference to `curve_'
collect2: ld returned 1 exit status


-- 
           Summary: Bogus error about procedure attribute
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jvdelisle at gcc dot gnu dot org


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


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

* [Bug fortran/45608] Bogus error about procedure attribute
  2010-09-09  4:39 [Bug fortran/45608] New: Bogus error about procedure attribute jvdelisle at gcc dot gnu dot org
@ 2010-09-09  5:35 ` burnus at gcc dot gnu dot org
  0 siblings, 0 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-09-09  5:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2010-09-09 05:35 -------
I am not sure how to improve this (internally).

NAG also prints:
f95 hjf.f90
Error: hjf.f90, line 26: Inconsistent usage of CURVE
       detected at )@%
Error: hjf.f90, line 26: Component of function reference
       detected at )@%

However, the error location could be better - instead of pointing to the
NAMELIST line, one could - as NAG, ifort and g95 do - point to the PRINT line,
e.g. g95:

print *, curve(1)%symbol%typee
              1
Error: PROCEDURE attribute conflicts with NAMELIST attribute in 'curve' at (1)


-- 


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


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

* [Bug fortran/45608] Bogus error about procedure attribute
       [not found] <bug-45608-4@http.gcc.gnu.org/bugzilla/>
  2013-06-15 13:16 ` dominiq at lps dot ens.fr
@ 2015-02-01 13:14 ` jvdelisle at gcc dot gnu.org
  1 sibling, 0 replies; 4+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2015-02-01 13:14 UTC (permalink / raw)
  To: gcc-bugs

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

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #3 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Agree.


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

* [Bug fortran/45608] Bogus error about procedure attribute
       [not found] <bug-45608-4@http.gcc.gnu.org/bugzilla/>
@ 2013-06-15 13:16 ` dominiq at lps dot ens.fr
  2015-02-01 13:14 ` jvdelisle at gcc dot gnu.org
  1 sibling, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-15 13:16 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-06-15
     Ever confirmed|0                           |1

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Still present at revision 200122. I share the Tobias' opinion that it won't be
easy to get a better error message. This PR should probably be closed as
WONTFIX.


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

end of thread, other threads:[~2015-02-01 13:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-09  4:39 [Bug fortran/45608] New: Bogus error about procedure attribute jvdelisle at gcc dot gnu dot org
2010-09-09  5:35 ` [Bug fortran/45608] " burnus at gcc dot gnu dot org
     [not found] <bug-45608-4@http.gcc.gnu.org/bugzilla/>
2013-06-15 13:16 ` dominiq at lps dot ens.fr
2015-02-01 13:14 ` jvdelisle at gcc dot gnu.org

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