[Bug bootstrap/48014] New: Bootstrap fails in stage2 on Fortran front end typedef collision.

3dw4rd at verizon dot net gcc-bugzilla@gcc.gnu.org
Mon Mar 7 13:19:00 GMT 2011


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

           Summary: Bootstrap fails in stage2 on Fortran front end typedef
                    collision.
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: 3dw4rd@verizon.net


Created attachment 23567
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23567
Replace pointer_t with pointer_type in module.c to allow bootstrap on MachOS.

On powerpc-apple-darwin7.9.0 I geth the following failure on bootstrap at
stage2:

/Users/ed/obj/./prev-gcc/xgcc -B/Users/ed/obj/./prev-gcc/
-B/Users/ed/bin/powerpc-apple-darwin7.9.0/bin/
-B/Users/ed/bin/powerpc-apple-darwin7.9.0/bin/
-B/Users/ed/bin/powerpc-apple-darwin7.9.0/lib/ -isystem
/Users/ed/bin/powerpc-apple-darwin7.9.0/include -isystem
/Users/ed/bin/powerpc-apple-darwin7.9.0/sys-include    -c  -DIN_GCC_FRONTEND -g
-O2 -mdynamic-no-pic -gtoggle -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -Ifortran
-I../../gcc/gcc -I../../gcc/gcc/fortran -I../../gcc/gcc/../include -I./../intl
-I../../gcc/gcc/../libcpp/include -I/usr/local/include -I/usr/local/include
-I/usr/local/include  -I../../gcc/gcc/../libdecnumber
-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber   
../../gcc/gcc/fortran/module.c -o fortran/module.o
../../gcc/gcc/fortran/module.c:110:1: error: redefinition of typedef
'pointer_t' with different type
/usr/include/mach/vm_types.h:35:26: note: previous declaration of 'pointer_t'
was here


In gcc/fortran/module.c:

typedef enum
{
  P_UNKNOWN = 0, P_OTHER, P_NAMESPACE, P_COMPONENT, P_SYMBOL
}
pointer_t;

In /usr/include/mach/vm_types.h:

typedef vm_offset_t             pointer_t;

Interwebs search on "gfortran error: redefinition of typedef 'pointer_t' with
different type"
Got be to a macports bug tracker where:
"solved replacing all pointer_t in module.c"

The macports people note failure of previous versions too:
"Installation of gcc45 (also gcc43 and gcc44) fails:"

I am attaching an obvious patch for mainline.

Thanks,
Ed Smith-Rowland



More information about the Gcc-bugs mailing list