public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/47978] New: [OOP] Invalid INTENT in overriding TBP not detected
@ 2011-03-03 16:44 sfilippone at uniroma2 dot it
  2011-03-03 16:47 ` [Bug fortran/47978] " sfilippone at uniroma2 dot it
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: sfilippone at uniroma2 dot it @ 2011-03-03 16:44 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [OOP] Invalid INTENT in overriding TBP not detected
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: sfilippone@uniroma2.it


Hello,
The attached code looks invalid to me (and to the NAG and XLF compilers), but
is accepted by gnu fortran. 

[sfilippo@localhost bug33]$ gfortran -v 
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gnu46/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/usr/local/gnu46
--enable-languages=c,c++,fortran --with-gmp=/home/travel/GCC/BUILDS/gmp
--with-mpfr=/home/travel/GCC/BUILDS/mpfr --with-mpc=/home/travel/GCC/BUILDS/mpc 
Thread model: posix
gcc version 4.6.0 20110225 (experimental) (GCC)

[sfilippo@localhost bug33]$ gfortran -c try_ext.f90 
[sfilippo@localhost bug33]$ 

----------------
[sfilippo@localhost bug33]$ nagfor -c try_ext.f90 -f2003
NAG Fortran Compiler Release 5.3(826),5.2(765)
Error: try_ext.f90, line 38: Argument J of overriding type-bound procedure BAR
of type EXTFOO has a different INTENT
Errors in declarations, no further processing for EXTFOO_MOD
[NAG Fortran Compiler error termination, 1 error]

-------------------------------------------
bash-3.2$ xlf2003 -c try_ext.f90 
** foo_mod   === End of Compilation 1 ===
"try_ext.f90", line 25.27: 1514-593 (S) Dummy argument j of overridden binding
bar was declared with the INTENT(IN) attribute.  The corresponding dummy
argument of overriding binding bar must also be declared with the INTENT(IN)
attribute.
** extfoo_mod   === End of Compilation 2 ===
1501-511  Compilation failed for file try_ext.f90.


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

end of thread, other threads:[~2011-09-14 15:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-03 16:44 [Bug fortran/47978] New: [OOP] Invalid INTENT in overriding TBP not detected sfilippone at uniroma2 dot it
2011-03-03 16:47 ` [Bug fortran/47978] " sfilippone at uniroma2 dot it
2011-03-04  7:11 ` burnus at gcc dot gnu.org
2011-09-08 14:57 ` janus at gcc dot gnu.org
2011-09-10 12:32 ` janus at gcc dot gnu.org
2011-09-11 20:25 ` janus at gcc dot gnu.org
2011-09-11 20:29 ` janus at gcc dot gnu.org
2011-09-14 13:37 ` dominiq at lps dot ens.fr
2011-09-14 13:49 ` sfilippone at uniroma2 dot it
2011-09-14 13:54 ` sfilippone at uniroma2 dot it
2011-09-14 13:57 ` janus at gcc dot gnu.org
2011-09-14 14:08 ` janus at gcc dot gnu.org
2011-09-14 15:12 ` sfilippone at uniroma2 dot it

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