public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/54096] New: Type bound procedures
@ 2012-07-25 18:37 badass at vt dot edu
  2012-07-25 19:26 ` [Bug fortran/54096] " kargl at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: badass at vt dot edu @ 2012-07-25 18:37 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54096
           Summary: Type bound procedures
    Classification: Unclassified
           Product: gcc
           Version: 4.5.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: badass@vt.edu


running the following:

gfortran -c mod_constants.f90 -Wall -Wextra
gfortran -c mod_files.f90 -Wall -Wextra
gfortran -c class_ships.f90 -Wall -Wextra
gfortran -c mod_io.f90 -Wall -Wextra
gfortran prg_fwb.f90 *.o -Wall -Wextra -fno-strict-aliasing -fwrapv

yeilds:

mod_files.f90:340.85:

broutine setUnitNumber( unitNumber,  numberOfFiles, fileOffset, unit, fType )
                                                                           1
Warning: Unused dummy argument 'ftype' at (1)
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
prg_fwb.f90:13.74:

                              , getShipData                 !& ! procedure
                                                                          1
Fatal Error: Can't open module file 'mod_io.mod' for reading at (1): No such   
     file or directory



we believe the segmentation fault is caused by lines 166 or 167 of mod_io
because an internal compiler error is generated, I don't think it's generating
the ".i" files requested on the bug report instructions.


$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/4.5.3/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with:
/gnu/gcc/releases/respins/4.5.3-3/gcc4-4.5.3-3/src/gcc-4.5.3/configure
--srcdir=/gnu/gcc/releases/respins/4.5.3-3/gcc4-4.5.3-3/src/gcc-4.5.3
--prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
--libexecdir=/usr/lib --datadir=/usr/share --localstatedir=/var
--sysconfdir=/etc --datarootdir=/usr/share --docdir=/usr/share/doc/gcc4 -C
--datadir=/usr/share --infodir=/usr/share/info --mandir=/usr/share/man -v
--with-gmp=/usr --with-mpfr=/usr --enable-bootstrap
--enable-version-specific-runtime-libs --libexecdir=/usr/lib --enable-static
--enable-shared --enable-shared-libgcc --disable-__cxa_atexit --with-gnu-ld
--with-gnu-as --with-dwarf2 --disable-sjlj-exceptions
--enable-languages=ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite
--enable-lto --enable-java-awt=gtk --disable-symvers --enable-libjava
--program-suffix=-4 --enable-libgomp --enable-libssp --enable-libada
--enable-threads=posix --with-arch=i686 --with-tune=generic
--enable-libgcj-sublibs CC=gcc-4 CXX=g++-4 CC_FOR_TARGET=gcc-4
CXX_FOR_TARGET=g++-4 GNATMAKE_FOR_TARGET=gnatmake GNATBIND_FOR_TARGET=gnatbind
--with-ecj-jar=/usr/share/java/ecj.jar
Thread model: posix
gcc version 4.5.3 (GCC)


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

* [Bug fortran/54096] Type bound procedures
  2012-07-25 18:37 [Bug fortran/54096] New: Type bound procedures badass at vt dot edu
@ 2012-07-25 19:26 ` kargl at gcc dot gnu.org
  2012-07-25 20:20 ` burnus at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: kargl at gcc dot gnu.org @ 2012-07-25 19:26 UTC (permalink / raw)
  To: gcc-bugs

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

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 2012-07-25 19:26:20 UTC ---
Please attach the source code to the PR.
Please try a newer version of gfortran as 4.5.3 is fairly old.


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

* [Bug fortran/54096] Type bound procedures
  2012-07-25 18:37 [Bug fortran/54096] New: Type bound procedures badass at vt dot edu
  2012-07-25 19:26 ` [Bug fortran/54096] " kargl at gcc dot gnu.org
@ 2012-07-25 20:20 ` burnus at gcc dot gnu.org
  2012-07-25 23:42 ` badass at vt dot edu
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-07-25 20:20 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2012-07-25
                 CC|                            |burnus at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-07-25 20:19:55 UTC ---
(In reply to comment #1)
> Please try a newer version of gfortran as 4.5.3 is fairly old.

Especially for type-bound procedures and related features. For those, you
should use the current release 4.7.1 or the developer version 4.8

You find links to unofficial gfortran builds at:
  http://gcc.gnu.org/wiki/GFortranBinaries

(Cygwin.org does not seem to have a newer build; you might want to try the
MinGW/MinGW-w64 version.)


And as Steve wrote: It is nearly impossible to debug and fix compiler bugs
without a full example.


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

* [Bug fortran/54096] Type bound procedures
  2012-07-25 18:37 [Bug fortran/54096] New: Type bound procedures badass at vt dot edu
  2012-07-25 19:26 ` [Bug fortran/54096] " kargl at gcc dot gnu.org
  2012-07-25 20:20 ` burnus at gcc dot gnu.org
@ 2012-07-25 23:42 ` badass at vt dot edu
  2012-07-26  8:44 ` burnus at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: badass at vt dot edu @ 2012-07-25 23:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from badass at vt dot edu 2012-07-25 23:42:16 UTC ---
Sorry about that, I though i had included the source code. I'm working
on getting an updated compiler, but IT here is being difficult and I could
take a day. Thanks for the help, source code is attached.

-Benjamin A. Dassert




On Wed, Jul 25, 2012 at 4:19 PM, burnus at gcc dot gnu.org <
gcc-bugzilla@gcc.gnu.org> wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54096
>
> Tobias Burnus <burnus at gcc dot gnu.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>              Status|UNCONFIRMED                 |WAITING
>    Last reconfirmed|                            |2012-07-25
>                  CC|                            |burnus at gcc dot gnu.org
>      Ever Confirmed|0                           |1
>
> --- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-07-25
> 20:19:55 UTC ---
> (In reply to comment #1)
> > Please try a newer version of gfortran as 4.5.3 is fairly old.
>
> Especially for type-bound procedures and related features. For those, you
> should use the current release 4.7.1 or the developer version 4.8
>
> You find links to unofficial gfortran builds at:
>   http://gcc.gnu.org/wiki/GFortranBinaries
>
> (Cygwin.org does not seem to have a newer build; you might want to try the
> MinGW/MinGW-w64 version.)
>
>
> And as Steve wrote: It is nearly impossible to debug and fix compiler bugs
> without a full example.
>
> --
> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.
>


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

* [Bug fortran/54096] Type bound procedures
  2012-07-25 18:37 [Bug fortran/54096] New: Type bound procedures badass at vt dot edu
                   ` (2 preceding siblings ...)
  2012-07-25 23:42 ` badass at vt dot edu
@ 2012-07-26  8:44 ` burnus at gcc dot gnu.org
  2012-07-26 14:10 ` badass at vt dot edu
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-07-26  8:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-07-26 08:43:48 UTC ---
(In reply to comment #3)
> Sorry about that, I though i had included the source code. I'm working
> on getting an updated compiler, but IT here is being difficult and I could
> take a day. Thanks for the help, source code is attached.

Seemingly, the mail interface of GCC's Bugzilla doesn't handle attachments.
Thus, please use the web interface to attach the file. Thanks!


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

* [Bug fortran/54096] Type bound procedures
  2012-07-25 18:37 [Bug fortran/54096] New: Type bound procedures badass at vt dot edu
                   ` (3 preceding siblings ...)
  2012-07-26  8:44 ` burnus at gcc dot gnu.org
@ 2012-07-26 14:10 ` badass at vt dot edu
  2012-07-26 14:14 ` badass at vt dot edu
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: badass at vt dot edu @ 2012-07-26 14:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from badass at vt dot edu 2012-07-26 14:10:30 UTC ---
Created attachment 27878
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27878
source code

all files are modules except for prg_fwb.f90.
we believe the error segmentation fault has something to do with lines 166-167
of mod_io.f90


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

* [Bug fortran/54096] Type bound procedures
  2012-07-25 18:37 [Bug fortran/54096] New: Type bound procedures badass at vt dot edu
                   ` (4 preceding siblings ...)
  2012-07-26 14:10 ` badass at vt dot edu
@ 2012-07-26 14:14 ` badass at vt dot edu
  2012-07-26 14:52 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: badass at vt dot edu @ 2012-07-26 14:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from badass at vt dot edu 2012-07-26 14:13:52 UTC ---
Trying again. Source code attached.


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

* [Bug fortran/54096] Type bound procedures
  2012-07-25 18:37 [Bug fortran/54096] New: Type bound procedures badass at vt dot edu
                   ` (5 preceding siblings ...)
  2012-07-26 14:14 ` badass at vt dot edu
@ 2012-07-26 14:52 ` burnus at gcc dot gnu.org
  2012-07-26 15:24 ` badass at vt dot edu
  2013-06-20 10:09 ` dominiq at lps dot ens.fr
  8 siblings, 0 replies; 10+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-07-26 14:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-07-26 14:52:33 UTC ---
(In reply to comment #5)
> Created attachment 27878 [details]
> source code

Compiles here (w/o errors) on x86-64-gnu-linux with
  gcc version 4.5.3 20110428 [gcc-4_5-branch revision 173117] (SUSE Linux)
However, I do get a link error due to a mishandling of the virtual table in the
compiler. (That's a bug in GCC 4.5 handling of polymorphic variables "CLASS".)

Using GCC 4.6 or 4.8, it compiles and runs, complaining at run time that the
input file could not be found. Thus, it seems as if you need at least 4.6.0
though newer 4.6 releases contain some other bugs fixes and 4.7 contains some
extra fixes for polymorphism. See http://gcc.gnu.org/wiki/OOP for details. (And
for an overview about new features http://gcc.gnu.org/wiki/GFortran#news )


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

* [Bug fortran/54096] Type bound procedures
  2012-07-25 18:37 [Bug fortran/54096] New: Type bound procedures badass at vt dot edu
                   ` (6 preceding siblings ...)
  2012-07-26 14:52 ` burnus at gcc dot gnu.org
@ 2012-07-26 15:24 ` badass at vt dot edu
  2013-06-20 10:09 ` dominiq at lps dot ens.fr
  8 siblings, 0 replies; 10+ messages in thread
From: badass at vt dot edu @ 2012-07-26 15:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from badass at vt dot edu 2012-07-26 15:24:29 UTC ---
Thanks, will try with newer version of gcc on my end.


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

* [Bug fortran/54096] Type bound procedures
  2012-07-25 18:37 [Bug fortran/54096] New: Type bound procedures badass at vt dot edu
                   ` (7 preceding siblings ...)
  2012-07-26 15:24 ` badass at vt dot edu
@ 2013-06-20 10:09 ` dominiq at lps dot ens.fr
  8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-20 10:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
I confirm that the code compiles with 4.6.4 up to trunk. No news since almost a
year then closing as fixed. Please reopen if I am wrong.


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

end of thread, other threads:[~2013-06-20 10:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-25 18:37 [Bug fortran/54096] New: Type bound procedures badass at vt dot edu
2012-07-25 19:26 ` [Bug fortran/54096] " kargl at gcc dot gnu.org
2012-07-25 20:20 ` burnus at gcc dot gnu.org
2012-07-25 23:42 ` badass at vt dot edu
2012-07-26  8:44 ` burnus at gcc dot gnu.org
2012-07-26 14:10 ` badass at vt dot edu
2012-07-26 14:14 ` badass at vt dot edu
2012-07-26 14:52 ` burnus at gcc dot gnu.org
2012-07-26 15:24 ` badass at vt dot edu
2013-06-20 10:09 ` 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).