Bug 33646 - [4.3 Regression] Gcc 4.3 revision 128954 failed tonto in SPEC CPU 2006
Summary: [4.3 Regression] Gcc 4.3 revision 128954 failed tonto in SPEC CPU 2006
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-03 18:39 UTC by H.J. Lu
Modified: 2007-12-03 04:16 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2007-10-03 18:39:41 UTC
Gcc 4.3 revision 128980 generates:

str.fppized.f90:337.29:

      module procedure create
                            1
Error: Ambiguous interfaces 'create' and 'create' in generic interface 'create_' at (1) 
str.fppized.f90:337.29:

Revision 128885 is OK.
Comment 1 H.J. Lu 2007-10-03 20:33:44 UTC
[hjl@gnu-23 build_base_o2.0000]$ cat bar.f90 
module BAR_MODULE
   implicit none
   private
   public    create_
   interface create_
      module procedure create
   end interface
contains
   subroutine create(self)
    character(*) :: self
      pointer :: self
      allocate(self)
   end subroutine
end
[hjl@gnu-23 build_base_o2.0000]$ /usr/gcc-4.3/bin/gfortran -c bar.f90
[hjl@gnu-23 build_base_o2.0000]$ cat foo.f90 
module FOO_MODULE
   use BAR_MODULE
   implicit none
   private
   public    create_
   interface create_
      module procedure create
   end interface

   public    create_copy_
   interface create_copy_
      module procedure create_copy
   end interface
contains

   subroutine create(self)
    character(*) :: self
      pointer :: self
      nullify(self)
      allocate(self)

      self = " "
   end subroutine

   subroutine create_copy(self,s)
    character(*) :: self
      pointer :: self
      character(*) :: s
      call create_(self)
   end subroutine
end
[hjl@gnu-23 build_base_o2.0000]$ /usr/gcc-4.3/bin/gfortran -c foo.f90
foo.f90:7.29:

      module procedure create
                            1
Error: Ambiguous interfaces 'create' and 'create' in generic interface 'create_' at (1)
foo.f90:7.29:

      module procedure create
                            1
Warning: Ambiguous interfaces 'create' and 'create' in generic interface 'create_' at (1)
[hjl@gnu-23 build_base_o2.0000]$ 
Comment 2 H.J. Lu 2007-10-03 20:55:30 UTC
It should be:

[hjl@gnu-27 pr33646]$ cat bar.f90 
module BAR_MODULE
   implicit none
   private
   public    create_
   interface create_
      module procedure create
   end interface
   type system_type
       integer(kind=kind(1)) :: max_memory_used
   end type

contains

   subroutine create(self)
    type(system_type) :: self
      pointer :: self
      allocate(self)
   end subroutine

end
[hjl@gnu-27 pr33646]$ cat bar.f90 
module BAR_MODULE
   implicit none
   private
   public    create_
   interface create_
      module procedure create
   end interface
   type system_type
       integer(kind=kind(1)) :: max_memory_used
   end type

contains

   subroutine create(self)
    type(system_type) :: self
      pointer :: self
      allocate(self)
   end subroutine

end
[hjl@gnu-27 pr33646]$ make
gfortran -c bar.f90
gfortran -c foo.f90
foo.f90:7.29:

      module procedure create
                            1
Error: Ambiguous interfaces 'create' and 'create' in generic interface 'create_'
 at (1)
foo.f90:7.29:

      module procedure create
                            1
Warning: Ambiguous interfaces 'create' and 'create' in generic interface 'create
_' at (1)
make[1]: *** [foo.o] Error 1
Comment 3 Paul Thomas 2007-10-03 21:21:28 UTC
hj,

It's me - I'll revert the patch that did this, right away.

Cheers

Paul

Comment 4 Dominique d'Humieres 2007-10-03 21:32:18 UTC
> It's me

I have warned you;-)

Comment 5 H.J. Lu 2007-10-03 21:38:44 UTC
Revision 128954:

http://gcc.gnu.org/ml/gcc-cvs/2007-10/msg00058.html

is the cause.
Comment 6 Paul Thomas 2007-10-04 04:47:17 UTC
It's reverted - sorry HJ.

Paul
Comment 7 hjl@gcc.gnu.org 2007-10-04 13:42:58 UTC
Subject: Bug 33646

Author: hjl
Date: Thu Oct  4 13:42:48 2007
New Revision: 129008

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129008
Log:
Mention PR fortran/33646 in revision 129000.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/testsuite/ChangeLog

Comment 8 hjl@gcc.gnu.org 2007-10-04 15:39:22 UTC
Subject: Bug 33646

Author: hjl
Date: Thu Oct  4 15:39:11 2007
New Revision: 129015

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129015
Log:
2007-10-04  H.J. Lu  <hongjiu.lu@intel.com>

	PR fortran/33646
	* gfortran.dg/pr33646.f90: New file.

Added:
    trunk/gcc/testsuite/gfortran.dg/pr33646.f90
Modified:
    trunk/gcc/testsuite/ChangeLog