With the attached test case I get: 
[EMAIL PROTECTED] type_ambiguity]$ gfortran -v -c type_ambiguity.f90 
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.3.1/configure --prefix=/usr/local/gcc43
--with-mpfr=/usr/local/mpfr --with-gmp=/usr/local/gmp
Thread model: posix
gcc version 4.3.1 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-c' '-mtune=generic'
 /usr/local/gcc43/libexec/gcc/i686-pc-linux-gnu/4.3.1/f951 type_ambiguity.f90
-quiet -dumpbase type_ambiguity.f90 -mtune=generic -auxbase type_ambiguity
-version -fintrinsic-modules-path
/usr/local/gcc43/lib/gcc/i686-pc-linux-gnu/4.3.1/finclude -o /tmp/cc6I26kb.s
GNU F95 (GCC) version 4.3.1 (i686-pc-linux-gnu)
        compiled by GNU C version 4.3.1, GMP version 4.2.2, MPFR version 2.3.0.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
type_ambiguity.f90:283.14:

  type(vector) :: new_pos  ! the new vertex position, after smoothing
             1
Error: Type name 'vector' at (1) is ambiguous

I cannot see any ambiguity in the source code. 

The code compiles cleanly on 4.2.4, fails on 4.4-20080822, compiles cleanly on
Intel 10.1.015 and on XLF 10.1. 

The code has been extracted from an application, and has been heavily pruned. 

The Intel compiler  gives a warning about an intent(out) variable not being
set, but this is an artifact of pruning the test case. 

The most puzzling things are the two workarounds that I have found so far: 
1. In the subroutine smooth_mesh, comment the USE statement at line 279. 
   This is not an option in the original application code, though. 
2. In the subroutine smooth_mesh, switch the order of the USE statements at   
lines 277/278; this also fixes the original application code. 

I cannot see anything illegal in the code, so I presume it is a reject-valid;
however even if the code is shown to be illegal, the reported error does
precious little to help the user. 


Salvatore


-- 
           Summary: error: type name is ambiguous.
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sfilippone at uniroma2 dot it
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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

Reply via email to