Description: This test case resulted from attempting to modify the way that the initialization of pointers in a named common was done in some OpenMP tests. This test case is syntatically correct, but the gfortran compiler is not able to compile it.
> gfortran -v Using built-in specs. Target: x86_64-suse-linux Configured with: ../xt-gcc-4.2.0/configure --prefix=/opt/gcc/4.2.0/snos --disable-nls --libdir=/opt/gcc/4.2.0/snos/lib --enable-languages=c,c++,fortran --with-gxx-include-dir=/opt/gcc/4.2.0/snos/include/g++ --with-slibdir=/opt/gcc/4.2.0/snos/lib --with-system-zlib --enable-shared --enable-__cxa_atexit x86_64-suse-linux Thread model: posix gcc version 4.2.0 20070514 (rpm:4) > cat bug2828.f90 BLOCK DATA integer, pointer :: ptr1 => NULL() common / T / ptr1 END > ftn -c bug2828.f90 /opt/xt-pe/2.1/bin/snos64/ftn: INFO: linux target is being used bug2828.f90:3.24: common / T / ptr1 1 Error: Previously initialized symbol 'ptr1' in COMMON block 't' at (1) - - - Note: reversing the common and integer statements still results in an error. ------ Note: ftn is an alias for: /opt/gcc/4.2.0/bin/../snos/bin/gfortran -static -v -I/opt/xt-mpt/2.1/mpich2-64/GP/include -I/opt/xt-mpt/2.1/mpich2-64/GP/include -L/opt/xt-mpt/2.1/mpich2-64/GP/lib -I/opt/acml/3.6.1/gnu64/include -I/opt/xt-libsci/10.1.0/gnu/snos64/include -I/opt/xt-libsci/10.1.0/gnu/snos64/include/superlu -I/opt/xt-mpt/2.1/sma/P/include -L/opt/acml/3.6.1/gnu64/lib -L/opt/xt-libsci/10.1.0/gnu/snos64/lib -L/opt/xt-mpt/2.1/sma/P/lib -lmpichf90 -lsci -lacml -lsma -lmpichf90 -lmpich -lrt -D__CRAYXT_COMPUTE_LINUX_TARGET -D__TARGET_LINUX__ -fno-second-underscore -I/notbackedup/users/rsrel/rs64.DEV.070604.Mon/install/include -I/opt/xt-catamount/2.1/catamount/linux/include -I/opt/xt-service/2.1/include -L/notbackedup/users/rsrel/rs64.DEV.070604.Mon/install/lib/snos64 -L/opt/xt-pe/2.1/cnos/linux/64/lib -L/opt/xt-mpt/2.1/lib/snos64 -L/opt/xt-service/2.1/lib/snos64 -Wl,--start -lpct -lalpslli -lalpsutil -lportals -lpthread -Wl,--end -lgfortranbegin -lgfortran -lm -- Summary: GFORTRAN WON'T ACCEPT TYPE DECLARATION TO INITIALIZE DATA IN NAMED COMMON Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: longb at cray dot com GCC build triplet: x86_64-suse-linux GCC host triplet: x86_64-suse-linux GCC target triplet: x86_64-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32361