This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libgfortran, 4.2] Syntax error in array constructor


On 12/15/06, Eric Botcazou <ebotcazou@libertysurf.fr> wrote:
> Any ideas what is going wrong here?

libgfortran/selected_int_kind.inc has very likely been corrupted, which would
mean that your Fortran compiler is non-functional.  It should contain

  integer, parameter :: c = 3
  type (real_info), parameter :: real_infos(c) = (/ &
    real_info (4, precision(0.0_4), range(0.0_4)), &
    real_info (8, precision(0.0_8), range(0.0_8)), &
    real_info (10, precision(0.0_10), range(0.0_10)) /)

or something along these lines.

sure is...


[chj@arnljot libgfortran]$ pwd
/usr/local/src/branch/objdir/sparc64-unknown-linux-gnu/libgfortran
[chj@arnljot libgfortran]$ more selected_int_kind.inc
 integer, parameter :: c = 0
 type (int_info), parameter :: int_infos(c) = (/ &
[chj@arnljot libgfortran]$

I removed the generated selected_int_kind.inc and tried rebuild, the
new generated looks like this now:

[chj@arnljot objdir]$ more
sparc64-unknown-linux-gnu/libgfortran/selected_int_kind.inc
 integer, parameter :: c = 4
 type (int_info), parameter :: int_infos(c) = (/ &
   int_info (1, range(0_1)), &
   int_info (2, range(0_2)), &
   int_info (4, range(0_4)), &
   int_info (8, range(0_8)) /)

but again I got into troubles....

/bin/sh ./libtool --mode=compile
/usr/local/src/branch/objdir/./gcc/gfortran
-B/usr/local/src/branch/objdir/./gcc/
-B/usr/local/sparc64-unknown-linux-gnu/bin/
-B/usr/local/sparc64-unknown-linux-gnu/lib/ -isystem
/usr/local/sparc64-unknown-linux-gnu/include -isystem
/usr/local/sparc64-unknown-linux-gnu/sys-include -I . -Wall
-fno-repack-arrays -fno-underscoring  -c -o selected_real_kind.lo
`test -f 'intrinsics/selected_real_kind.f90' || echo
'../../../gcc/libgfortran/'`intrinsics/selected_real_kind.f90
/usr/local/src/branch/objdir/./gcc/gfortran
-B/usr/local/src/branch/objdir/./gcc/
-B/usr/local/sparc64-unknown-linux-gnu/bin/
-B/usr/local/sparc64-unknown-linux-gnu/lib/ -isystem
/usr/local/sparc64-unknown-linux-gnu/include -isystem
/usr/local/sparc64-unknown-linux-gnu/sys-include -I . -Wall
-fno-repack-arrays -fno-underscoring -c
../../../gcc/libgfortran/intrinsics/selected_real_kind.f90  -fPIC
-DPIC -o .libs/selected_real_kind.o
../../../gcc/libgfortran/intrinsics/selected_real_kind.f90:37.21:

 selected_real_kind = 0
                   1
Error: Syntax error in array constructor at (1)
../../../gcc/libgfortran/intrinsics/selected_real_kind.f90:49.28:

   if (p2 <= real_infos (i) % precision) found_p = .true.
                          1
Error: Syntax error in IF-expression at (1)
../../../gcc/libgfortran/intrinsics/selected_real_kind.f90:50.28:

   if (r2 <= real_infos (i) % range) found_r = .true.
                          1
Error: Syntax error in IF-expression at (1)
../../../gcc/libgfortran/intrinsics/selected_real_kind.f90:52.6:

     selected_real_kind = real_infos (i) % kind
    1
Error: Unclassifiable statement at (1)
make[3]: *** [selected_real_kind.lo] Error 1
make[3]: Leaving directory
`/usr/local/src/branch/objdir/sparc64-unknown-linux-gnu/libgfortran'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/usr/local/src/branch/objdir/sparc64-unknown-linux-gnu/libgfortran'
make[1]: *** [all-target-libgfortran] Error 2
make[1]: Leaving directory `/usr/local/src/branch/objdir'
make: *** [all] Error 2

So, I am pondering a complete rebuild... not trying to delete any
files and try to continue the build....

--
Cheers,

/ChJ


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]