public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/46327] New: type field access by . (instead of %) unsupported
@ 2010-11-06  4:41 jan.kratochvil at redhat dot com
  2010-11-06  4:49 ` [Bug fortran/46327] " kargl at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jan.kratochvil at redhat dot com @ 2010-11-06  4:41 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: type field access by . (instead of %) unsupported
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jan.kratochvil@redhat.com
            Target: x86_64-unknown-linux-gnu


Some legacy Fortrans supported access type.field (like in C).
It works with iFort (11.1 20100806).
It does not work with:
GNU Fortran (GCC) 4.4.6 20101105 (prerelease)
GNU Fortran (GCC) 4.6.0 20101105 (experimental)

program main
  type foo
    integer :: a
  end type foo
  type(foo) :: q
  q.a = 3
  print *, q
end program main

->

struct.f90:6.2:

  q.a = 3
  1
Error: Unclassifiable statement at (1)


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

* [Bug fortran/46327] type field access by . (instead of %) unsupported
  2010-11-06  4:41 [Bug fortran/46327] New: type field access by . (instead of %) unsupported jan.kratochvil at redhat dot com
@ 2010-11-06  4:49 ` kargl at gcc dot gnu.org
  2010-11-06  5:01 ` jan.kratochvil at redhat dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: kargl at gcc dot gnu.org @ 2010-11-06  4:49 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org 2010-11-06 04:48:40 UTC ---
Hopefully, this will never be supported in gfortran.
The source code should be updated to use the standard
conforming syntax.  IMHO, this should be closed with
INVALID.  I'll let other gfortran developers weigh in
before I close this PR.


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

* [Bug fortran/46327] type field access by . (instead of %) unsupported
  2010-11-06  4:41 [Bug fortran/46327] New: type field access by . (instead of %) unsupported jan.kratochvil at redhat dot com
  2010-11-06  4:49 ` [Bug fortran/46327] " kargl at gcc dot gnu.org
@ 2010-11-06  5:01 ` jan.kratochvil at redhat dot com
  2010-11-06  6:20 ` sgk at troutmask dot apl.washington.edu
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jan.kratochvil at redhat dot com @ 2010-11-06  5:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2010-11-06 05:01:35 UTC ---
(In reply to comment #1)
> Hopefully, this will never be supported in gfortran.

The problem is users continue to use iFort and I have to continue supporting it
in GDB as they sources work fine in iFort.  It is fine if an explicit gfortran
compilation option is required.


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

* [Bug fortran/46327] type field access by . (instead of %) unsupported
  2010-11-06  4:41 [Bug fortran/46327] New: type field access by . (instead of %) unsupported jan.kratochvil at redhat dot com
  2010-11-06  4:49 ` [Bug fortran/46327] " kargl at gcc dot gnu.org
  2010-11-06  5:01 ` jan.kratochvil at redhat dot com
@ 2010-11-06  6:20 ` sgk at troutmask dot apl.washington.edu
  2010-11-06  6:50 ` sgk at troutmask dot apl.washington.edu
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2010-11-06  6:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2010-11-06 06:20:06 UTC ---
On Sat, Nov 06, 2010 at 05:01:45AM +0000, jan.kratochvil at redhat dot com
wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46327
> 
> --- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2010-11-06 05:01:35 UTC ---
> (In reply to comment #1)
> > Hopefully, this will never be supported in gfortran.
> 
> The problem is users continue to use iFort and I have to continue supporting it
> in GDB as they sources work fine in iFort.  It is fine if an explicit gfortran
> compilation option is required.
> 

Their source may work fine with ifort, but it is
not standard conforming Fortran.  If they need
to debug their code, then they should use Intel's
debugger.  Their code will not compile with
gfortran, so trying to debug gfortran compiled
Fortran code should not be an issue with gdb.


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

* [Bug fortran/46327] type field access by . (instead of %) unsupported
  2010-11-06  4:41 [Bug fortran/46327] New: type field access by . (instead of %) unsupported jan.kratochvil at redhat dot com
                   ` (2 preceding siblings ...)
  2010-11-06  6:20 ` sgk at troutmask dot apl.washington.edu
@ 2010-11-06  6:50 ` sgk at troutmask dot apl.washington.edu
  2010-11-06  7:18 ` jan.kratochvil at redhat dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2010-11-06  6:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Steve Kargl <sgk at troutmask dot apl.washington.edu> 2010-11-06 06:49:55 UTC ---
On Fri, Nov 05, 2010 at 11:19:57PM -0700, Steve Kargl wrote:
> On Sat, Nov 06, 2010 at 05:01:45AM +0000, jan.kratochvil at redhat dot com wrote:
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46327
> > 
> > --- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2010-11-06 05:01:35 UTC ---
> > (In reply to comment #1)
> > > Hopefully, this will never be supported in gfortran.
> > 
> > The problem is users continue to use iFort and I have to continue supporting it
> > in GDB as they sources work fine in iFort.  It is fine if an explicit gfortran
> > compilation option is required.
> > 
> 
> Their source may work fine with ifort, but it is
> not standard conforming Fortran.  If they need
> to debug their code, then they should use Intel's
> debugger.  Their code will not compile with
> gfortran, so trying to debug gfortran compiled
> Fortran code should not be an issue with gdb.

Having thought about this for a few more minutes,
I can't see the issue.  The compile pipelines are

Fortran code --> ifort --> gdb
Fortran code --> gfortran --> gdb

I simply fail to see why gfortran needs to support
the dot syntax.  This seems to be a purely gdb
issue.  Do you want to support ifort syntax
or not?


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

* [Bug fortran/46327] type field access by . (instead of %) unsupported
  2010-11-06  4:41 [Bug fortran/46327] New: type field access by . (instead of %) unsupported jan.kratochvil at redhat dot com
                   ` (3 preceding siblings ...)
  2010-11-06  6:50 ` sgk at troutmask dot apl.washington.edu
@ 2010-11-06  7:18 ` jan.kratochvil at redhat dot com
  2010-11-06  9:21 ` steven at gcc dot gnu.org
  2010-11-06  9:25 ` dominiq at lps dot ens.fr
  6 siblings, 0 replies; 8+ messages in thread
From: jan.kratochvil at redhat dot com @ 2010-11-06  7:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2010-11-06 07:18:24 UTC ---
(In reply to comment #3)
> If they need to debug their code, then they should use Intel's debugger.

That is less comfortable for them than GDB.


(In reply to comment #4)
> Fortran code --> ifort --> gdb
> Fortran code --> gfortran --> gdb
> 
> I simply fail to see why gfortran needs to support the dot syntax.

As otherwise users use iFort which has various DWARF incompatibilities needing
to be thus supported by gdb, iFort does not support build-id and other GNU
features so it is difficult to workaround all the iFort issues with the GNU
toolchain around.

> This seems to be a purely gdb issue.

You are right GDB should also support it.  That is not targeted by this Bug.

(gdb) p q.a
A syntax error in expression, near `.a'.
(gdb) p q%a
$3 = 3


> Do you want to support ifort syntax or not?

'.' is not an iFort syntax, it is some legacy Fortran syntax.
Yes, I would like gfortran to support the '.' syntax.


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

* [Bug fortran/46327] type field access by . (instead of %) unsupported
  2010-11-06  4:41 [Bug fortran/46327] New: type field access by . (instead of %) unsupported jan.kratochvil at redhat dot com
                   ` (4 preceding siblings ...)
  2010-11-06  7:18 ` jan.kratochvil at redhat dot com
@ 2010-11-06  9:21 ` steven at gcc dot gnu.org
  2010-11-06  9:25 ` dominiq at lps dot ens.fr
  6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu.org @ 2010-11-06  9:21 UTC (permalink / raw)
  To: gcc-bugs

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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |steven at gcc dot gnu.org
         Resolution|                            |WONTFIX

--- Comment #6 from Steven Bosscher <steven at gcc dot gnu.org> 2010-11-06 09:20:58 UTC ---
I am against implementing support for this => WONTFIX.

Fortran is complocated enough as it is, without frivolous extension. GFortran
also doesn't support the other DEC extensions (STRUCTURE, $DEC, etc.) by
design, and I see no reason to make an exception here.


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

* [Bug fortran/46327] type field access by . (instead of %) unsupported
  2010-11-06  4:41 [Bug fortran/46327] New: type field access by . (instead of %) unsupported jan.kratochvil at redhat dot com
                   ` (5 preceding siblings ...)
  2010-11-06  9:21 ` steven at gcc dot gnu.org
@ 2010-11-06  9:25 ` dominiq at lps dot ens.fr
  6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2010-11-06  9:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2010-11-06 09:25:28 UTC ---
> I am against implementing support for this => WONTFIX.

See
http://gcc.gnu.org/onlinedocs/gfortran/Extensions-not-implemented-in-GNU-Fortran.html#Extensions-not-implemented-in-GNU-Fortran


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

end of thread, other threads:[~2010-11-06  9:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-06  4:41 [Bug fortran/46327] New: type field access by . (instead of %) unsupported jan.kratochvil at redhat dot com
2010-11-06  4:49 ` [Bug fortran/46327] " kargl at gcc dot gnu.org
2010-11-06  5:01 ` jan.kratochvil at redhat dot com
2010-11-06  6:20 ` sgk at troutmask dot apl.washington.edu
2010-11-06  6:50 ` sgk at troutmask dot apl.washington.edu
2010-11-06  7:18 ` jan.kratochvil at redhat dot com
2010-11-06  9:21 ` steven at gcc dot gnu.org
2010-11-06  9:25 ` dominiq at lps dot ens.fr

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