public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/37310]  New: gfortran errors in compilation and the making for upgraded compilers
@ 2008-09-01 10:20 petermorgan at grapevine dot net dot au
  2008-09-01 14:01 ` [Bug fortran/37310] " jvdelisle at gcc dot gnu dot org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: petermorgan at grapevine dot net dot au @ 2008-09-01 10:20 UTC (permalink / raw)
  To: gcc-bugs

My system response to the gcc -v is
[peterm@currawong ~]$ gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-cpu=generic --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC) 
[peterm@currawong ~]$

The error message is

Running unimake to create Makefile for blsum
System name:  Linux currawong 2.6.25.14-108.fc9.x86_64 #1 SMP Mon Aug 4
13:46:35 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
System release number translated to  2625
No i86 compiler specification--assuming gfortran (gcc 4.2x)
Makefile for blsum remade by unimake
gfortran -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic -fno-backslash
blsum.f  ../gen_util/gen_util_lib.a ../../libraries/matrix/kinv_lib.a
../../libraries/comlib/com_lib.a  -o blsum
rm -f blsum.o
gfortran -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic -fno-backslash
ensum.f  ../gen_util/gen_util_lib.a ../../libraries/matrix/kinv_lib.a
../../libraries/comlib/com_lib.a  -o ensum
rm -f ensum.o
gfortran -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic -fno-backslash
tssum.f  ../gen_util/gen_util_lib.a ../../libraries/matrix/kinv_lib.a
../../libraries/comlib/com_lib.a  -o tssum
tssum.f: In function 'remove_ejmp':
tssum.f:712: internal compiler error: in set_uids_in_ptset, at
tree-ssa-structalias.c:4773
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make: *** [tssum] Error 1
Failure in make_globk -- install_software terminated
[peterm@currawong gamit-10.34]$

First a Lot of background.
I am a numerical guy mainly working as a beta tester on largish GPS and
geodetic programs. In this case it is the MIT GPS suite GAMIT/GLOBK. I have
just recently moved from a 32 bit environment to a 64 bit environment. It hasnt
been all that easy.

The suggestion is that it is GNU rather than our GAMIT code that is at fault,
but this not a given.

I tried several options, all of which generated a second set of errors. These
options all revolved around re-building the GNU program suite
So off I go and get myself a copy of GNU4.3.1 and I attempt to build my own
gfortran rather than use the system one.  The first problems that I run into
are the interdependencies Gnu 4.3.1 requires the latest  mpfr and gmp packages.

Here is what happens
peterm@currawong gcc-4.3.1]$ ../gcc-4.3.1.source/configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1
$$f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.

BUT the distribution has
 gmp-4.2.2-7.fc9.x86_64.rpm  and   gmp-devel-4.2.2-7.fc9.x86_64.rpm
 mpfr-2.3.0-3.fc9.x86_64.rpm

I went and tried to update these packages as follows

[root@currawong media]# cd "Fedora 9 x86_64 DVD"/Packages
[root@currawong Packages]# ls *gmp*
gmp-4.2.2-7.fc9.i386.rpm  gmp-4.2.2-7.fc9.x86_64.rpm 
gmp-devel-4.2.2-7.fc9.i386.rpm  gmp-devel-4.2.2-7.fc9.x86_64.rpm
[root@currawong Packages]# rpm -Uvh gmp-4.2.2-7.fc9.x86_64.rpm
Preparing...                ########################################### [100%]
        package gmp-4.2.2-7.fc9.x86_64 is already installed
[root@currawong Packages]# ls *mpfr*
mpfr-2.3.0-3.fc9.x86_64.rpm
[root@currawong Packages]# rpm -Uvh mpfr-2.3.0-3.fc9.x86_64.rpm
Preparing...                ########################################### [100%]
        package mpfr-2.3.0-3.fc9.x86_64 is already installed
[root@currawong Packages]#


but in the /usr/lib64 library we have

[root@currawong Packages]# cd /usr/lib64
[root@currawong lib64]#
[root@currawong lib64]# ls -lrt libgmp*
-rwxr-xr-x 1 root root  15424 2008-03-20 00:29 libgmpxx.so.4.0.2
-rwxr-xr-x 1 root root 274056 2008-03-20 00:29 libgmp.so.3.4.2
lrwxrwxrwx 1 root root     17 2008-08-11 07:18 libgmpxx.so.4 ->
libgmpxx.so.4.0.2
lrwxrwxrwx 1 root root     15 2008-08-11 07:18 libgmp.so.3 -> libgmp.so.3.4.2
lrwxrwxrwx 1 root root     13 2008-08-11 07:22 libgmpxx.so -> libgmpxx.so.4
lrwxrwxrwx 1 root root     15 2008-08-11 07:22 libgmp.so -> libgmp.so.3.4.2
[root@currawong lib64]# ls -lrt libmpfr*
-rwxr-xr-x 1 root root 270776 2008-02-22 09:40 libmpfr.so.1.1.0
lrwxrwxrwx 1 root root     16 2008-08-11 07:18 libmpfr.so.1 -> libmpfr.so.1.1.0
[root@currawong lib64]#


Note the use of wild cards and that both modules do not have the correct
matching versions.
Something is quite out of wack here so I went and got the latest versions and
did the configure, make, used gmp-4.2.3 and  mpfr-2.3.1 and configured with
--prefix=/opt so the /opt/lib then contained.

-rwxrwxr-x 1 root peterm     867 2008-08-13 15:26 libnetcdf.la
-rwxrwxr-x 1 root peterm 3249576 2008-08-13 15:26 libnetcdf.a
-rwxrwxr-x 1 root peterm     879 2008-08-13 15:26 libnetcdf_c++.la
-rwxrwxr-x 1 root peterm  932248 2008-08-13 15:26 libnetcdf_c++.a
-rwxr-xr-x 1 root root   1136055 2008-09-01 12:44 libmpfr.so.1.1.1
lrwxrwxrwx 1 root root        16 2008-09-01 12:44 libmpfr.so.1 ->
libmpfr.so.1.1.1
lrwxrwxrwx 1 root root        16 2008-09-01 12:44 libmpfr.so ->
libmpfr.so.1.1.1
-rwxr-xr-x 1 root root       832 2008-09-01 12:44 libmpfr.la
-rw-r--r-- 1 root root   2501742 2008-09-01 12:44 libmpfr.a
-rwxr-xr-x 1 root root    315225 2008-09-01 13:09 libgmp.so.3.4.3
lrwxrwxrwx 1 root root        15 2008-09-01 13:09 libgmp.so.3 ->
libgmp.so.3.4.3
lrwxrwxrwx 1 root root        15 2008-09-01 13:09 libgmp.so -> libgmp.so.3.4.3
-rwxr-xr-x 1 root root       779 2008-09-01 13:09 libgmp.la
-rw-r--r-- 1 root root    800636 2008-09-01 13:09 libgmp.a

These numbers and version are the same as in the /usr/lib64 area.

Attempts to make new compilers fails with exactly the same errors. I dont
understand what is wrong unless it is a bug. Appreciate help.
Ths peter

So it seems that there are issues in generating a new gfortran compiler.


-- 
           Summary: gfortran errors in compilation and the making for
                    upgraded compilers
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: petermorgan at grapevine dot net dot au


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug fortran/37310] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
@ 2008-09-01 14:01 ` jvdelisle at gcc dot gnu dot org
  2008-09-01 22:23 ` petermorgan at grapevine dot net dot au
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-09-01 14:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jvdelisle at gcc dot gnu dot org  2008-09-01 14:00 -------
Try seeing if you need to install mpfr-devel and gmp-devel packages for your
distribution.  This will install the headers needed for those libraries.

Also, make sure you are building in a separate directory away from the source
tree for gcc.

The aforementioned are probably the most common problems I have seen. 


-- 


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug fortran/37310] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
  2008-09-01 14:01 ` [Bug fortran/37310] " jvdelisle at gcc dot gnu dot org
@ 2008-09-01 22:23 ` petermorgan at grapevine dot net dot au
  2008-09-01 22:40 ` kargl at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: petermorgan at grapevine dot net dot au @ 2008-09-01 22:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from petermorgan at grapevine dot net dot au  2008-09-01 22:22 -------
Subject: Re:  gfortran errors in compilation and the making
 for upgraded compilers

Thanks for the mail message below.

I have checked my system as suggested. The gmp-development is installed see

[root@currawong Fedora 9 x86_64 DVD]# cd Packages
[root@currawong Packages]# ls *gmp*
gmp-4.2.2-7.fc9.i386.rpm  gmp-4.2.2-7.fc9.x86_64.rpm  
gmp-devel-4.2.2-7.fc9.i386.rpm  gmp-devel-4.2.2-7.fc9.x86_64.rpm
[root@currawong Packages]# rpm -Uvh gmp-devel-4.2.2-7.fc9.x86_64.rpm
Preparing...                ########################################### 
[100%]
        package gmp-devel-4.2.2-7.fc9.x86_64 is already installed
[root@currawong Packages]# ls *mpfr*
mpfr-2.3.0-3.fc9.x86_64.rpm

There is no development package for mpfr, see http://www.mpfr.org/
Perhaps I am wrong but I did do a full, new, install from a tar file to 
try and beet the header file issue.


On the matter of using an object and source directory structure. This is 
my standard approach.
Apologies I should have also included that line. Here is the full 
invocation which shows the object and source directory separation.


[peterm@currawong gcc-4.3.1]$  ../gcc-4.3.1.source/configure --prefix=/opt
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 
$$f1 $$f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... no
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/.
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.

Regards

jvdelisle at gcc dot gnu dot org wrote:
> ------- Comment #1 from jvdelisle at gcc dot gnu dot org  2008-09-01 14:00 -------
> Try seeing if you need to install mpfr-devel and gmp-devel packages for your
> distribution.  This will install the headers needed for those libraries.
>
> Also, make sure you are building in a separate directory away from the source
> tree for gcc.
>
> The aforementioned are probably the most common problems I have seen. 
>
>
>   

-- 
***************************************
*                                     *
*  Peter and Carol Morgan             *
*  20 Goodparla St                    *
*  Hawker, ACT, 2614                  *
*  Australia                          *
*                                     *
* Home Phone      +61 (0)2 6254 0137  *
* Peter's Mobile  +61 (0)4 1854 0137  *
*                                     *
*                                     *
***************************************


-- 


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug fortran/37310] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
  2008-09-01 14:01 ` [Bug fortran/37310] " jvdelisle at gcc dot gnu dot org
  2008-09-01 22:23 ` petermorgan at grapevine dot net dot au
@ 2008-09-01 22:40 ` kargl at gcc dot gnu dot org
  2008-09-01 23:14 ` petermorgan at grapevine dot net dot au
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: kargl at gcc dot gnu dot org @ 2008-09-01 22:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from kargl at gcc dot gnu dot org  2008-09-01 22:38 -------
(In reply to comment #2)

> checking for correct version of gmp.h... yes
> checking for correct version of mpfr.h... no

Clearly, configure can't find your installation of MPFR.


> configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
> Try the --with-gmp and/or --with-mpfr options to specify their locations.

Re-read the last sentence above.  It appears you forgot to try 
the --with-mpfr configure option.


-- 


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug fortran/37310] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
                   ` (2 preceding siblings ...)
  2008-09-01 22:40 ` kargl at gcc dot gnu dot org
@ 2008-09-01 23:14 ` petermorgan at grapevine dot net dot au
  2008-09-01 23:23 ` petermorgan at grapevine dot net dot au
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: petermorgan at grapevine dot net dot au @ 2008-09-01 23:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from petermorgan at grapevine dot net dot au  2008-09-01 23:12 -------
Subject: Re:  gfortran errors in compilation and the making
 for upgraded compilers

Dear All

thanks for the reply

I have brought up the configure help pages of GNU.
While I had tried the inclusion of the --with they failed because I did 
not understand that I needed to be one directory above the lib and the 
include directories to use --with-mpfr=DIRECTORY option

Here below where I have explicity included the mpfr library and the 
include  headers all seems to be fixed. I have also tested the generic 
include and it too works.

I will continue with compilation make.

ths









[peterm@currawong gcc-4.3.1]$  ../gcc-4.3.1.source/configure 
--prefix=/opt --with-mpfr-lib=/opt/lib --with-mpfr-include=/opt/include
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gnatbind... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 
$$f1 $$f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... yes
The following languages will be built: c,c++,fortran,java,objc


kargl at gcc dot gnu dot org wrote:
> ------- Comment #3 from kargl at gcc dot gnu dot org  2008-09-01 22:38 -------
> (In reply to comment #2)
>
>   
>> checking for correct version of gmp.h... yes
>> checking for correct version of mpfr.h... no
>>     
>
> Clearly, configure can't find your installation of MPFR.
>
>
>   
>> configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
>> Try the --with-gmp and/or --with-mpfr options to specify their locations.
>>     
>
> Re-read the last sentence above.  It appears you forgot to try 
> the --with-mpfr configure option.
>
>
>   

-- 
***************************************
*                                     *
*  Peter and Carol Morgan             *
*  20 Goodparla St                    *
*  Hawker, ACT, 2614                  *
*  Australia                          *
*                                     *
* Home Phone      +61 (0)2 6254 0137  *
* Peter's Mobile  +61 (0)4 1854 0137  *
*                                     *
*                                     *
***************************************




kargl at gcc dot gnu dot org wrote:
> ------- Comment #3 from kargl at gcc dot gnu dot org  2008-09-01 22:38 -------
> (In reply to comment #2)
>
>   
>> checking for correct version of gmp.h... yes
>> checking for correct version of mpfr.h... no
>>     
>
> Clearly, configure can't find your installation of MPFR.
>
>
>   
>> configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
>> Try the --with-gmp and/or --with-mpfr options to specify their locations.
>>     
>
> Re-read the last sentence above.  It appears you forgot to try 
> the --with-mpfr configure option.
>
>
>   

-- 
***************************************
*                                     *
*  Peter and Carol Morgan             *
*  20 Goodparla St                    *
*  Hawker, ACT, 2614                  *
*  Australia                          *
*                                     *
* Home Phone      +61 (0)2 6254 0137  *
* Peter's Mobile  +61 (0)4 1854 0137  *
*                                     *
*                                     *
***************************************


-- 


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug fortran/37310] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
                   ` (3 preceding siblings ...)
  2008-09-01 23:14 ` petermorgan at grapevine dot net dot au
@ 2008-09-01 23:23 ` petermorgan at grapevine dot net dot au
  2008-09-01 23:32 ` kargl at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: petermorgan at grapevine dot net dot au @ 2008-09-01 23:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from petermorgan at grapevine dot net dot au  2008-09-01 23:22 -------
Subject: Re:  gfortran errors in compilation and the making
 for upgraded compilers

Hi Guys

Do you want a new bug report for this error.

I issued a "   make bootstrap" after the configure in the normal way.


the error is


make[5]: Entering directory 
`/opt/gnu/gcc-4.3.1/x86_64-unknown-linux-gnu/32/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
/opt/gnu/gcc-4.3.1/./gcc/xgcc -B/opt/gnu/gcc-4.3.1/./gcc/ 
-B/opt/x86_64-unknown-linux-gnu/bin/ 
-B/opt/x86_64-unknown-linux-gnu/lib/ -isystem 
/opt/x86_64-unknown-linux-gnu/include -isystem 
/opt/x86_64-unknown-linux-gnu/sys-include -g -fkeep-inline-functions 
-m32 -O2  -O2 -g -g -O2   -DIN_GCC    -W -Wall -Wwrite-strings 
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  
-isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 
-D__GCC_FLOAT_NOT_NEEDED   -I. -I. -I../../.././gcc 
-I../../../../gcc-4.3.1.source/libgcc 
-I../../../../gcc-4.3.1.source/libgcc/. 
-I../../../../gcc-4.3.1.source/libgcc/../gcc 
-I../../../../gcc-4.3.1.source/libgcc/../include 
-I../../../../gcc-4.3.1.source/libgcc/config/libbid 
-DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_TLS -o _muldi3.o -MT 
_muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c 
../../../../gcc-4.3.1.source/libgcc/../gcc/libgcc2.c \
          -fvisibility=hidden -DHIDE_EXPORTS
In file included from /usr/include/features.h:359,
                 from /usr/include/stdio.h:28,
                 from 
../../../../gcc-4.3.1.source/libgcc/../gcc/tsystem.h:90,
                 from 
../../../../gcc-4.3.1.source/libgcc/../gcc/libgcc2.c:33:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or 
directory
make[5]: *** [_muldi3.o] Error 1
make[5]: Leaving directory 
`/opt/gnu/gcc-4.3.1/x86_64-unknown-linux-gnu/32/libgcc'
make[4]: *** [multi-do] Error 1
make[4]: Leaving directory 
`/opt/gnu/gcc-4.3.1/x86_64-unknown-linux-gnu/libgcc'
make[3]: *** [all-multi] Error 2
make[3]: Leaving directory 
`/opt/gnu/gcc-4.3.1/x86_64-unknown-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/opt/gnu/gcc-4.3.1'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/opt/gnu/gcc-4.3.1'
make: *** [bootstrap] Error 2

The current hardware is X86_64 so I dint understand the search or path 
to gnu/stubs-32.h or why there was a need to go usr/include/features.h:359

Apologies for not understanding things here.
Peter


kargl at gcc dot gnu dot org wrote:
> ------- Comment #3 from kargl at gcc dot gnu dot org  2008-09-01 22:38 -------
> (In reply to comment #2)
>
>   
>> checking for correct version of gmp.h... yes
>> checking for correct version of mpfr.h... no
>>     
>
> Clearly, configure can't find your installation of MPFR.
>
>
>   
>> configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
>> Try the --with-gmp and/or --with-mpfr options to specify their locations.
>>     
>
> Re-read the last sentence above.  It appears you forgot to try 
> the --with-mpfr configure option.
>
>
>   

-- 
***************************************
*                                     *
*  Peter and Carol Morgan             *
*  20 Goodparla St                    *
*  Hawker, ACT, 2614                  *
*  Australia                          *
*                                     *
* Home Phone      +61 (0)2 6254 0137  *
* Peter's Mobile  +61 (0)4 1854 0137  *
*                                     *
*                                     *
***************************************


-- 


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug fortran/37310] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
                   ` (4 preceding siblings ...)
  2008-09-01 23:23 ` petermorgan at grapevine dot net dot au
@ 2008-09-01 23:32 ` kargl at gcc dot gnu dot org
  2008-09-02  0:47 ` petermorgan at grapevine dot net dot au
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: kargl at gcc dot gnu dot org @ 2008-09-01 23:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from kargl at gcc dot gnu dot org  2008-09-01 23:31 -------
(In reply to comment #5)
> 
> Do you want a new bug report for this error.

No.  This isn't a gcc bug.

Try adding --disable-multilib to your configure line.


-- 


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug fortran/37310] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
                   ` (5 preceding siblings ...)
  2008-09-01 23:32 ` kargl at gcc dot gnu dot org
@ 2008-09-02  0:47 ` petermorgan at grapevine dot net dot au
  2008-09-02  2:38 ` petermorgan at grapevine dot net dot au
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: petermorgan at grapevine dot net dot au @ 2008-09-02  0:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from petermorgan at grapevine dot net dot au  2008-09-02 00:45 -------
Subject: Re:  gfortran errors in compilation and the making
 for upgraded compilers

Dear Kargl

Yes I added the additional bit of info and now I have built all the 
languages. I will now test them and let you know the outcome.
Thanks for the assistance
cheers peter

kargl at gcc dot gnu dot org wrote:
> ------- Comment #6 from kargl at gcc dot gnu dot org  2008-09-01 23:31 -------
> (In reply to comment #5)
>   
>> Do you want a new bug report for this error.
>>     
>
> No.  This isn't a gcc bug.
>
> Try adding --disable-multilib to your configure line.
>
>
>   

-- 
***************************************
*                                     *
*  Peter and Carol Morgan             *
*  20 Goodparla St                    *
*  Hawker, ACT, 2614                  *
*  Australia                          *
*                                     *
* Home Phone      +61 (0)2 6254 0137  *
* Peter's Mobile  +61 (0)4 1854 0137  *
*                                     *
*                                     *
***************************************


-- 


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug fortran/37310] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
                   ` (6 preceding siblings ...)
  2008-09-02  0:47 ` petermorgan at grapevine dot net dot au
@ 2008-09-02  2:38 ` petermorgan at grapevine dot net dot au
  2008-09-02  3:48 ` kargl at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: petermorgan at grapevine dot net dot au @ 2008-09-02  2:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from petermorgan at grapevine dot net dot au  2008-09-02 02:36 -------
Subject: Re:  gfortran errors in compilation and the making
 for upgraded compilers

Dear Guys

Okay I have a 4.3.1 set of language compilers on board.

I have tested the gfortran compiler on the NGA programs. These compile 
and generate output that is in agreement with known tests.

I them run it with the GAMIT/GLOBK suite and I get the same error 
message that we started with.
It is reproduced here with a copy of the gcc -v output.


[peterm@currawong gamit-10.34]$ gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.3.1.source/configure --prefix=/opt 
--with-mpfr-lib=/opt/lib --with-mpfr-include=/opt/include --disable-multilib
Thread model: posix
gcc version 4.3.1 (GCC)
[peterm@currawong gamit-10.34]$


Running unimake to create Makefile for blsum
System name:  Linux currawong 2.6.25.14-108.fc9.x86_64 #1 SMP Mon Aug 4 
13:46:35 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
System release number translated to  2625
No i86 compiler specification--assuming gfortran (gcc 4.2x)
Makefile for blsum remade by unimake
gfortran -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic 
-fno-backslash blsum.f  ../gen_util/gen_util_lib.a 
../../libraries/matrix/kinv_lib.a ../../libraries/comlib/com_lib.a  -o blsum
rm -f blsum.o
gfortran -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic 
-fno-backslash ensum.f  ../gen_util/gen_util_lib.a 
../../libraries/matrix/kinv_lib.a ../../libraries/comlib/com_lib.a  -o ensum
rm -f ensum.o
gfortran -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic 
-fno-backslash tssum.f  ../gen_util/gen_util_lib.a 
../../libraries/matrix/kinv_lib.a ../../libraries/comlib/com_lib.a  -o tssum
tssum.f: In function 'remove_ejmp':
tssum.f:712: internal compiler error: in set_uids_in_ptset, at 
tree-ssa-structalias.c:4789
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [tssum] Error 1
Failure in make_globk -- install_software terminated

So we now know that the error is common to both the version 4.3.0 and 
4.3.1 compilers.

regards peter





kargl at gcc dot gnu dot org wrote:
> ------- Comment #6 from kargl at gcc dot gnu dot org  2008-09-01 23:31 -------
> (In reply to comment #5)
>   
>> Do you want a new bug report for this error.
>>     
>
> No.  This isn't a gcc bug.
>
> Try adding --disable-multilib to your configure line.
>
>
>   

-- 
***************************************
*                                     *
*  Peter and Carol Morgan             *
*  20 Goodparla St                    *
*  Hawker, ACT, 2614                  *
*  Australia                          *
*                                     *
* Home Phone      +61 (0)2 6254 0137  *
* Peter's Mobile  +61 (0)4 1854 0137  *
*                                     *
*                                     *
***************************************


-- 


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug fortran/37310] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
                   ` (7 preceding siblings ...)
  2008-09-02  2:38 ` petermorgan at grapevine dot net dot au
@ 2008-09-02  3:48 ` kargl at gcc dot gnu dot org
  2008-09-02 12:12 ` [Bug tree-optimization/37310] " petermorgan at grapevine dot net dot au
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: kargl at gcc dot gnu dot org @ 2008-09-02  3:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from kargl at gcc dot gnu dot org  2008-09-02 03:46 -------
(In reply to comment #8)
> gfortran -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic 
> -fno-backslash tssum.f  ../gen_util/gen_util_lib.a 
> ../../libraries/matrix/kinv_lib.a ../../libraries/comlib/com_lib.a  -o tssum
> tssum.f: In function 'remove_ejmp':
> tssum.f:712: internal compiler error: in set_uids_in_ptset, at 
> tree-ssa-structalias.c:4789
> Please submit a full bug report,

What happens if you use a sane set of options?   In particular,
DO NOT USE any option with f2c in it name.   DO NOT USE --ffast-math,
which is misnamed.  What happens if you use -O or -O2.

Finally, is the source available?


-- 


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug tree-optimization/37310] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
                   ` (8 preceding siblings ...)
  2008-09-02  3:48 ` kargl at gcc dot gnu dot org
@ 2008-09-02 12:12 ` petermorgan at grapevine dot net dot au
  2008-09-02 16:58 ` sgk at troutmask dot apl dot washington dot edu
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: petermorgan at grapevine dot net dot au @ 2008-09-02 12:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from petermorgan at grapevine dot net dot au  2008-09-02 12:11 -------
Subject: Re:  gfortran errors in compilation and the making
 for upgraded compilers

Dear Guys

Here are the requests that you asked for.

The first run is without any mention of f2c in option names.
It still fails

Running unimake to create Makefile for blsum
System name:  Linux currawong 2.6.25.14-108.fc9.x86_64 #1 SMP Mon Aug 4 
13:46:35 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
System release number translated to  2625
No i86 compiler specification--assuming gfortran (gcc 4.2x)
Makefile for blsum remade by unimake
gfortran -O -Wuninitialized -fno-automatic -fno-backslash blsum.f  
../gen_util/gen_util_lib.a ../../libraries/matrix/kinv_lib.a 
../../libraries/comlib/com_lib.a  -o blsum
rm -f blsum.o
gfortran -O -Wuninitialized -fno-automatic -fno-backslash ensum.f  
../gen_util/gen_util_lib.a ../../libraries/matrix/kinv_lib.a 
../../libraries/comlib/com_lib.a  -o ensum
rm -f ensum.o
gfortran -O -Wuninitialized -fno-automatic -fno-backslash tssum.f  
../gen_util/gen_util_lib.a ../../libraries/matrix/kinv_lib.a 
../../libraries/comlib/com_lib.a  -o tssum
tssum.f: In function 'remove_ejmp':
tssum.f:712: internal compiler error: in set_uids_in_ptset, at 
tree-ssa-structalias.c:4789
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [tssum] Error 1
Failure in make_globk -- install_software terminated


-----------------------------------------------------------------------
Here is a second run with only -O set
It also has the same error in blsum

Running unimake to create Makefile for blsum
System name:  Linux currawong 2.6.25.14-108.fc9.x86_64 #1 SMP Mon Aug 4 
13:46:35 EDT 2008 x86_64 x86_64 x86_64 GNU/Linux
System release number translated to  2625
No i86 compiler specification--assuming gfortran (gcc 4.2x)
Makefile for blsum remade by unimake
gfortran -O  blsum.f  ../gen_util/gen_util_lib.a 
../../libraries/matrix/kinv_lib.a ../../libraries/comlib/com_lib.a  -o blsum
rm -f blsum.o
gfortran -O  ensum.f  ../gen_util/gen_util_lib.a 
../../libraries/matrix/kinv_lib.a ../../libraries/comlib/com_lib.a  -o ensum
rm -f ensum.o
gfortran -O  tssum.f  ../gen_util/gen_util_lib.a 
../../libraries/matrix/kinv_lib.a ../../libraries/comlib/com_lib.a  -o tssum
tssum.f: In function 'remove_ejmp':
tssum.f:712: internal compiler error: in set_uids_in_ptset, at 
tree-ssa-structalias.c:4789
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [tssum] Error 1
Failure in make_globk -- install_software terminated


-------------------------------------------------
Now I know that I had version 10.33 running under 4.2.2 on a 32 bit 
machine so I built a version 4.2.2 language system on my 64 bit machine.

[peterm@currawong blsum]$ gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.2.2.source/configure --prefix=/opt 
--with-mpfr-lib=/opt/lib --with-mpfr-include=/opt/include --disable-multilib
Thread model: posix
gcc version 4.2.2

There are no errors in a compilation of GAMIT/GLOBK
when I use this package.

I have attached the code modules for you. As I said they compile okay 
under 4.2.2

Please let me know how this helps.

cheers Peter


kargl at gcc dot gnu dot org wrote:
> ------- Comment #9 from kargl at gcc dot gnu dot org  2008-09-02 03:46 -------
> (In reply to comment #8)
>   
>> gfortran -O3 -Wuninitialized -fno-f2c -ffast-math -fno-automatic 
>> -fno-backslash tssum.f  ../gen_util/gen_util_lib.a 
>> ../../libraries/matrix/kinv_lib.a ../../libraries/comlib/com_lib.a  -o tssum
>> tssum.f: In function 'remove_ejmp':
>> tssum.f:712: internal compiler error: in set_uids_in_ptset, at 
>> tree-ssa-structalias.c:4789
>> Please submit a full bug report,
>>     
>
> What happens if you use a sane set of options?   In particular,
> DO NOT USE any option with f2c in it name.   DO NOT USE --ffast-math,
> which is misnamed.  What happens if you use -O or -O2.
>
> Finally, is the source available?
>
>
>   

-- 
***************************************
*                                     *
*  Peter and Carol Morgan             *
*  20 Goodparla St                    *
*  Hawker, ACT, 2614                  *
*  Australia                          *
*                                     *
* Home Phone      +61 (0)2 6254 0137  *
* Peter's Mobile  +61 (0)4 1854 0137  *
*                                     *
*                                     *
***************************************


      program tssum

*     Program to generate PBO time series files
*
*     Usages:
*     tssum <dir> <prod_id> <-R> <list of .org files>
*     
*     where <dir>  -- directory to put the time series in.  This directory
*      will be checked for existing files and these will be appended to
*           <prod_id> is product id with form: pbo.final_frame.  Characters
*                  5:9 will used for time series type (normally rapid or final)
*           <-R> causes exisiting time series files to be ignored
*           <list of .org files> glred/globk org files with output option PBOP
*      output option set.
*     
*     PROD_ID types valid in PBO:
*     Format <cen>.<series>_<frame>+<type>
*     <cen>     - Center 3 characters (bsl cwu pbo mit) or special product
*                 code e.g., aug for Augustine Volcano, aku for Akutan volcano
*     <series>  - Orbit series: final or rapid
*     <frame>   - Frame type: loose or frame 
*     <type>    - Optional type.  If not given series name is used.  Additional
*                 type put in the final series is supplemental run (suppl).
*     
*     Stsndard PROD_ID
*     pbo.rapid_frame
*     pbo.final_frame
*     pbo.final_frame+suppl



      include 'tssum.h'

      integer*4 len_run, nr, ierr, ns, rcpar, trimlen
      character*64 runstring 

****  OK, Read the runsting (for the moment just by position)
      len_run = rcpar(1,tsdir)
      ln_tsdir = len_run
      if( len_run.eq.0 ) then
        call proper_runstring('tssum.hlp','tssum',1)
      endif
      len_run = rcpar(2,prod_id)

* MOD TAH 051129: Extract type from prod_id: Format pbo.final_frame+suppl
      ts_ref_type = prod_id(5:9)
      if( len_run.gt.15 ) then
          ts_ref_type = prod_id(17:21)
          prod_id = prod_id(1:15)
      endif

      ln_prod_id = trimlen(prod_id)

      len_run = rcpar(3,runstring)
      if( runstring(1:2).eq.'-R' ) then
          ts_refresh = .true.
      else
          ts_refresh = .false.
      endif

***** OK Loop over input files
      num_ent = 0
      num_site = 0
      num_code = 0 
      nr = 3
      len_run = 1

      do while ( len_run.gt.0 )

         nr = nr + 1
         len_run = rcpar(nr,in_file)
         if( len_run.gt.0 ) then
             call read_in
         endif
      end do

      call systime( date_rel, sec_rel) 

****  OK, now loop over all the codes
      do ns = 1, num_code

*        Generate TS file name
         ts_file = tsdir(1:ln_tsdir) // '/' // in_code(ns) // '.' // 
     .             prod_id(1:ln_prod_id) // '.pos'

*****    Try to open file unless we are refreshing
         if( .not.ts_refresh ) then
             open(200,file=ts_file,iostat=ierr,status='old')
             if( ierr.ne.0 ) then
                 new_ts = .true.
             else
                 new_ts = .false.
             end if
         else
             new_ts = .true.
         end if

*****    See if we should read old series
         num_ts = 0
         if( .not.new_ts ) then
             call read_ts(200)
         else
             call gen_refdata(ns)
         endif

* MOD TAH 080325: Before merging correct input series for any
*        East jumps due to latitude shifts

         call remove_ejmp(ns)

*****    OK, merge new entries with old
         call merge_ts(ns)

*****    Now close the infile and re-open to write
         close(200)
         open(200,file=ts_file,iostat=ierr,status='unknown')
         call write_ts(200, ns)
      end do

***** Thats all
      end

CITTLE READ_IN

      subroutine read_in
      include 'tssum.h'


      character*8 gsite_name 
      character*16 gsite_full

      integer*4 date(5), ierr, jerr, j, ns, cs, ne
      integer*4 trimlen, indx
      real*8  gmjd, pos_xyz_fin(3),xyz_std(6), unc_geod(3),llu_std(3),
     .        pos_neu_fin(3), neu_std(6), sec 

      character*512 line

****  Open the input file
      open(100,file=in_file, iostat=ierr, status='old')
      call report_error('IOSTAT',ierr,'open',in_file,0,'tssum')

      sec = 0.d0

      do while ( ierr.eq.0 )
         read(100,'(a)', iostat=ierr) line
* MOD TAH 060921: Replaced XPS with X since eq-renames may change the name
         if( ierr.eq.0 .and. line(1:4).eq.'pbo.' .and.
     .       line(11:11).ne.'X' ) then
            read(line,100,iostat=jerr) gsite_name, gsite_full,
     .                  date, gmjd,
     .                 (pos_xyz_fin(j), j=1,3), (xyz_std(j),j=1,6),
     .                 (unc_geod(j),j=1,3), (llu_std(j),j=1,3),
     .                 (pos_neu_fin(j),j=1,3), (neu_std(j),j=1,6)
 100        format(5x,a8,1x,a16,1x,i5,4(1x,i2.2),1x,F10.4,
     .                  1x,3F15.5,3F8.5,3F7.3,3x,
     .                  2F16.10,1x,F10.5,1x,2F8.1,1x,F10.5,3x,
     .                  2F15.5,1x,F10.5,3F8.5,3F7.3)
            call report_error('IOSTAT',jerr,'read',line,0,'read_in')
c100        format('pbo. ',a8,1x,a16,1x,i5,4(1x,i2.2),1x,F10.4,
c    .                  1x,3F15.5,3F8.5,3F7.3,' | ',
c    .                  2F16.10,1x,F10.5,1x,2F8.1,1x,F10.5,' | ',
c    .                  2F15.5,1x,F10.5,3F8.5,3F7.3)
            call ymdhms_to_mjd(date, sec, gmjd)

            if( jerr.eq.0 ) then

*             See if we can match site name
              indx = 0
              call get_cmd(gsite_name,in_site,num_site,ns,indx)
              if( ns.le.0 ) then
                  num_site = num_site + 1
                  ns = num_site
                  in_site(ns) = gsite_name
              end if
              indx = 0
              call get_cmd(gsite_name(1:4),in_code,num_code,cs,indx)
              if( cs.le.0 ) then
                  num_code = num_code + 1
                  cs = num_code
                  in_full(cs) = gsite_full
                  in_code(cs) = gsite_name(1:4)
              end if

*****         OK save this entry
              num_ent = num_ent + 1
              ne = num_ent
              in_ns(ne)  = ns
              in_cs(ne)  = cs
              in_mjd(ne) = gmjd
              do j = 1,3
                 in_xyz(j,ne) = pos_xyz_fin(j)
                 in_neu(j,ne) = pos_neu_fin(j)
                 in_llu(j,ne) = unc_geod(j)
              end do
              do j = 1,6
                 in_xyz_std(j,ne) = xyz_std(j)
                 in_neu_std(j,ne) = neu_std(j)
              end do
            end if
         end if
      end do

****  Tell user were we are
      write(*,110) in_file(1:trimlen(in_file)), num_site, num_code, 
     .             num_ent
 110  format('File: ',a,' Sites ',i5,' Codes ',i5,' Entries ',i10)
      return
      end 

      subroutine read_ts(unit)

      include 'tssum.h'

      integer*4 unit, ierr, jerr, trimlen, date(5), i, j, isec
      integer*4 ts_srt(max_ts)  ! indexs to sorted time series 
      integer*4 kn, cnt, in 
      real*8 sec, rot(3,3)
      real*8 max_mjd, min_mjd   ! Max and min m,jd used in sorting
      logical line_read  ! Set true when line has been read checking for
                         ! Field dscriptions.
      logical time_order_out  ! Set true to denote file out of time order
      logical set ! Set true when ranked value put in ts_srt



      character*512 line

****  Read the header records
      read(unit,'(a)',iostat=ierr) line
* MOD TAH 051129: See if version line next
      call report_error('IOSTAT',ierr,'read',line,1,'read_ts')
      read(unit,'(a)',iostat=ierr) line
      if( index(line,'Version').gt.0 ) then
          read(line,105,iostat=ierr) ts_ver_read
 105      format(16x,a)
c105      format('Format Version: ',a)
          call report_error('IOSTAT',ierr,'read',line,1,'read_ts')
          read(unit,'(a)',iostat=ierr) line
      endif

      read(line,110,iostat=ierr) ts_code
 110  format(16x,a)
c110  format('4-character ID: ',a4)
      call report_error('IOSTAT',ierr,'read',line,1,'read_ts')
      read(unit,120,iostat=ierr) ts_full
 120  format(16x,a16)
c120  format('Station name  : ',a16)
      call report_error('IOSTAT',ierr,'read','Station',1,'read_ts')
      read(unit,'(a)',iostat=ierr) line
      read(line,130,iostat=ierr) date, isec
 130  format(16x,i4,i2,i2,1x,i2,i2,i2)
      sec = isec
c130  format('First Epoch   : ', i4,i2.2,i2.2,1x,i2.2,i2.2,i2.2)
      call report_error('IOSTAT',ierr,'read',line,1,'read_ts')
      call ymdhms_to_mjd(date,sec,ts_first)
cFirst Epoch   : 20060521 120000
      read(unit,140,iostat=ierr) date, isec
      sec = isec
 140  format(16x, i4,i2,i2,1x,i2,i2,i2)
      call report_error('IOSTAT',ierr,'read','Last Epoch',1,'read_ts')
c140  format('Last Epoch    : ', i4,i2.2,i2.2,1x,i2.2,i2.2,i2.2)
      call ymdhms_to_mjd(date,sec,ts_last)

C**** Do not read release date, since we will generate a new one here
C     read(unit,150,iostat=ierr) date_rel, nint(sec_rel)
      read(unit,'(a)',iostat=ierr) line
 150  format(16x, i4,i2,i2,1x,i2,i2,i2)
c150  format('Release Data  : ', i4,i2.2,i2.2,1x,i2.2,i2.2,i2.2)
      call report_error('IOSTAT',ierr,'read',line,1,'tssum')

      read(unit,200,iostat=ierr) ref_xyz
 200  format(25x,3F15.5)
c200  format('XYZ Reference position : ',3F15.5)
      call report_error('IOSTAT',ierr,'read',line,1,'tssum')

      call XYZ_to_GEOD(rot,ref_xyz, ref_llu) 
      call loc_to_geod(ref_llu, ref_neu)

C     Use compute version
C      read(unit,220,iostat=ierr) (pi/2-ref_llu(1))*180/pi,
C     .                            ref_llu(2)*180/pi,ref_llu(3)
      read(unit,'(a)',iostat=ierr) line
 220  format(25x,2F16.10,1x,F10.5)
      call report_error('IOSTAT',ierr,'read',line,1,'tssum')
c220  format('NEU Reference position : ',2F16.10,1x,F10.5)

* MOD TAH 080108: See if field descrription lines are present
      read(unit,'(a)',iostat=ierr) line
      line_read = .true.
      if( index(line,'Start Field Description').gt.0 ) then
          do while (index(line,'End Field Description').eq.0 )
             read(unit,'(a)',iostat=ierr) line
             call report_error('IOSTAT',ierr,'read',ts_file,0,
     .                         'tssum/Field Description')
          enddo
          line_read = .false.
      endif

****  OK, Now read in the time series
      i = 0
      time_order_out = .false.
      do while ( ierr.eq.0 )
          if( .not.line_read ) then
              read(unit,'(a)',iostat=ierr) line
          endif
          line_read = .false.

          if( ierr.eq.0 ) then
             i = i + 1
             read(line,300,iostat=jerr) date, isec, ts_mjd(i),
     .        (ts_xyz(j,i),j=1,3), (ts_xyz_std(j,i),j=1,6),
     .        (ts_llu(j,i),j=1,3),
     .        (ts_neu(j,i),j=1,3), (ts_neu_std(j,i),j=1,6),
     .         ts_type(i)
             sec = isec
 300         format(1x,i4,i2,i2,1x,i2,i2,i2,1x,F10.4,
     .           3F15.5,3F9.5,3F7.3,3x,2F16.10,1x,F10.5,3x,
     .           3(F9.5,1x),1x,3F9.5,3F7.3,1x,a5)
             if( jerr.ne.0 ) then
                 write(*,310) jerr, line(1:trimlen(line))
 310             format('JERR ',i4,1x,a)
             endif
             call ymdhms_to_mjd(date,sec,ts_mjd(i))
             do j = 1,3
                 ts_neu(j,i) = ts_neu(j,i) + ref_neu(j)
             end do

****         Make sure that time series is in time order.
             if( i.gt.1 .and. ts_mjd(i).lt.ts_mjd(i-1) ) then
                write(*,320) ts_file(1:trimlen(ts_file)),i
 320            format('**WARNING** Time series in ',a,
     .                 ' out of time order at record ',i5)
                time_order_out = .true.
             endif 
          end if
      end do

* MOD TAH 080104: If time seris out of order, resort now.
      num_ts = i
      if( time_order_out ) then
*        Buildup up list of indices in time order.  In this
*        approach dupliucate times are replaced with later 
*        values.
         do i = 1,num_ts
             ts_srt(i) = 0
         end do
         max_mjd = -1e20
         cnt = 0
         do i = 1, num_ts
             min_mjd = 1e20
             set = .false.
             do j = 1, num_ts
                if( ts_mjd(j) .le. min_mjd .and.
     .              ts_mjd(j) .gt. max_mjd ) then
                    ts_srt(i) = j
                    min_mjd  = ts_mjd(j)
                    set = .true.
                endif
             enddo
             if( set ) then
                 cnt = cnt + 1
                 max_mjd = ts_mjd(ts_srt(i))
             end if
         enddo 
*        ts_srt now is sorted list.  Sort the list of values
         do i = 1, num_ts
            in = ts_srt(i)
*           if in > 0 then swap the ith entry with the in'th
*           value
            call save_ts(i,0)  ! cp i'th entries to save values (0)
            call save_ts(in,i) ! cp in'th entries to ith values
            call save_ts(0,in) ! cp saved values to in'th entry
*           Now update ts_srt to show values have moved
            kn = 0
            do j = i+1,num_ts
               if( ts_srt(j).eq.i ) then
                   kn =j
               endif
            enddo
            if( kn.gt. 0 ) then
                ts_srt(kn) = in
            endif
         end do
*        Save number of values in time series
         num_ts = cnt
      endif

      write(*,400) ts_file(1:trimlen(ts_file)), num_ts
 400  format('TS_file ',a,' sorted entries ',i5)

****  Thats all
      return
      end

CTITLE SAVE_TS

      subroutine save_ts(in,out)

*     Routine to save time series values from index in to index out
*     If out is zero, save to or from save arrrays

      include 'tssum.h'

      integer*4 in, out

* LOCAL
      integer*4 i


****  See which way we are saving
      if( in.gt.0 .and. out.gt.0 ) then
          ts_mjd(out) = ts_mjd(in)
          ts_type(out) = ts_type(in)
          do i = 1,3
             ts_xyz(i,out) = ts_xyz(i,in)
             ts_llu(i,out) = ts_llu(i,in)
             ts_neu(i,out) = ts_neu(i,in)
          enddo
          do i = 1,6
             ts_xyz_std(i,out) = ts_xyz_std(i,in)
             ts_neu_std(i,out) = ts_neu_std(i,in)
          enddo
      elseif( out .eq. 0 ) then
          sv_mjd = ts_mjd(in)
          sv_type = ts_type(in)
          do i = 1,3
             sv_xyz(i) = ts_xyz(i,in)
             sv_llu(i) = ts_llu(i,in)
             sv_neu(i) = ts_neu(i,in)
          enddo
          do i = 1,6
             sv_xyz_std(i) = ts_xyz_std(i,in)
             sv_neu_std(i) = ts_neu_std(i,in)
          enddo
      elseif( in.eq.0 ) then
          ts_mjd(out) = sv_mjd
          ts_type(out) = sv_type
          do i = 1,3
             ts_xyz(i,out) = sv_xyz(i)
             ts_llu(i,out) = sv_llu(i)
             ts_neu(i,out) = sv_neu(i)
          enddo
          do i = 1,6
             ts_xyz_std(i,out) = sv_xyz_std(i)
             ts_neu_std(i,out) = sv_neu_std(i)
          enddo
      else
          call report_error('PROG',-1,'sav','timeseries',0,'save_ts')
      endif
      return
      end

CTITLE GEN_REFDATA

      subroutine gen_refdata(ns)
      include 'tssum.h'
      integer*4 ns  ! code site number

      real*8 av_xyz(3)
      integer*4 na, i, j

****  Routine to generate reference XYZ
      do j = 1,3 
        av_xyz(j) = 0.0d0
      end do
      na = 0

      do i = 1, num_ent
         if( in_cs(i).eq.ns) then
             if( in_xyz_std(1,i).lt.0.1d0 .and.
     .           in_xyz_std(2,i).lt.0.1d0 .and.
     .           in_xyz_std(3,i).lt.0.1d0 ) then 
                na = na + 1
                do j = 1,3
                   av_xyz(j) = av_xyz(j) + in_xyz(j,i)
                end do
             end if
         end if
      end do
      if( na.gt.0 ) then
          do j = 1,3
             ref_xyz(j) = av_xyz(j)/na
          end do
      else
*         Nothing with sigmas less than 10 cm: So what to do?
*         Use all available data?
          do i = 1, num_ent
             if( in_cs(i).eq.ns) then
                 na = na + 1
                 do j = 1,3
                    av_xyz(j) = av_xyz(j) + in_xyz(j,i)
                 end do
              end if
          end do
          if( na.gt.0 ) then
              do j = 1,3
                 ref_xyz(j) = av_xyz(j)/na
              end do
          end if
      endif


****  Thats all
      return
      end

      subroutine merge_ts(ns)

*     Routine to merge the new time series values with the old ones
*     If a time matches with an old value, the older value will be replaced.

      include 'tssum.h'

      integer*4 ns  ! code site number

      integer*4 i,j,k, n, l

      logical replaced ! Logical set true if entry is being replaced with
                       ! a new one.


      do i = 1, num_ent
         if( in_cs(i).eq.ns) then

****        The site code matches, scan the old time series values
*           to see we need to replace the value, insert a new one or
*           append to the old list (later would be most common).
*           Times may differ by a minute or so; so test with toleranace
C           if( num_ts.gt.0 .and. in_mjd(i).le.ts_mjd(num_ts) ) then
            replaced = .false.
            if( num_ts.gt.0 .and. 
     .          in_mjd(i)-ts_mjd(num_ts).lt.1.d-3 ) then
*               This entry is earlier.  Find out where to put it.
                n = num_ts
                do while ( n.ge.1 ) 
C                    if ( ts_mjd(n).eq.in_mjd(i) ) then
                    if ( abs(ts_mjd(n)-in_mjd(i)).le.1.d-3 ) then
*                      Matches the time, so replace the old values
*                      with the new
                       k = n
                       n = 0
                       replaced = .true.  
                    elseif ( ts_mjd(n).lt.in_mjd(i) .or.n.eq.1) then
*                      Need to move up all the old values and insert
*                      the new entry in at n+1
                       k = n+1
*                      Move up the old values
                       do l = num_ts+1, k, -1
                          ts_mjd(l) = ts_mjd(l-1)
                          ts_type(l) = ts_type(l-1)
                          do j = 1, 3
                             ts_xyz(j,l) = ts_xyz(j,l-1)
                             ts_neu(j,l) = ts_neu(j,l-1)
                             ts_llu(j,l) = ts_llu(j,l-1)
                          enddo
                          do j = 1, 6
                             ts_xyz_std(j,l) = ts_xyz_std(j,l-1)
                             ts_neu_std(j,l) = ts_neu_std(j,l-1)
                          enddo
                       end do
                       num_ts = num_ts + 1
                       n = 0
                    else
                       n = n -1
                    end if
                end do
            else 
*               Normal case of just adding new results to end
                num_ts = num_ts + 1
                k = num_ts
            endif

*           Now add the new values
            ts_mjd(k) = in_mjd(i)
*           Get which code we should add for this point.  
            if( replaced .and. ts_ref_type.eq.'suppl' ) then
                ts_type(k) = 'suppf'
            elseif( replaced .and. ts_ref_type.eq.'campd' ) then
                ts_type(k) = 'campf'
            else
                ts_type(k) = ts_ref_type
            endif

            do j = 1, 3
               ts_xyz(j,k) = in_xyz(j,i)
               ts_neu(j,k) = in_neu(j,i)
               ts_llu(j,k) = in_llu(j,i)
            enddo
            do j = 1, 6
               ts_xyz_std(j,k) = in_xyz_std(j,i)
               ts_neu_std(j,k) = in_neu_std(j,i)
            enddo


         end if
      end do
****  Thats all
      return
      end

      subroutine write_ts(unit,ns)

      include '../includes/const_param.h'
      include 'tssum.h'

      integer*4 ns  ! code site number
      integer*4 unit  ! unit number

      integer*4 ierr, i, j, date(5)
      real*8 sec, rot(3,3)
      real*8 ts_mag, Cts_mag  ! Magnitude of XYZ/NEU and function to
                                  ! compute it.

***** Scan the ts list and get start and stop times
      ts_first = 1.d6
      ts_last  = 0.d0
      do i = 1, num_ts
         if( ts_mjd(i).lt.ts_first ) ts_first = ts_mjd(i)
         if( ts_mjd(i).gt.ts_last  ) ts_last = ts_mjd(i)
      end do

***** Write out the header lines
      write(unit,100,iostat=ierr) 
 100  format('PBO Station Position Time Series')
* MOD TAH 051129: Write out version number
      write(unit,105,iostat=ierr) ts_ver
 105  format('Format Version: ',a)

      write(unit,110,iostat=ierr) in_code(ns)
 110  format('4-character ID: ',a4)
      write(unit,120,iostat=ierr) in_full(ns)
 120  format('Station name  : ',a16)
      call jd_to_ymdhms(ts_first+1d-6, date,sec)
      write(unit,130,iostat=ierr) date, nint(sec)
 130  format('First Epoch   : ', i4,i2.2,i2.2,1x,i2.2,i2.2,i2.2)
      call jd_to_ymdhms(ts_last+1d-6, date,sec)
      write(unit,140,iostat=ierr) date, nint(sec)
 140  format('Last Epoch    : ', i4,i2.2,i2.2,1x,i2.2,i2.2,i2.2)
      write(unit,150,iostat=ierr) date_rel, nint(sec_rel)
 150  format('Release Data  : ', i4,i2.2,i2.2,1x,i2.2,i2.2,i2.2)

      write(unit,200,iostat=ierr) ref_xyz
 200  format('XYZ Reference position : ',3F15.5)

      call XYZ_to_GEOD(rot,ref_xyz, ref_llu) 
      call loc_to_geod(ref_llu, ref_neu)

      write(unit,220,iostat=ierr) (pi/2-ref_llu(1))*180/pi,
     .                            ref_llu(2)*180/pi,ref_llu(3)
 220  format('NEU Reference position : ',2F16.10,1x,F10.5)

****  OK, Now write out the time series
      do i = 1, num_ts
          call jd_to_ymdhms(ts_mjd(i)+1.d-6,date,sec)
*
*         Check size
          ts_mag = Cts_mag(ts_neu(1,i),ref_neu)
          if( ts_mag.lt.99.999d0 ) then 
*            Use Standard format                  
             write(unit,300) date, nint(sec), ts_mjd(i),
     .           (ts_xyz(j,i),j=1,3), (ts_xyz_std(j,i),j=1,6),
     .           (ts_llu(j,i),j=1,3),
     .           (ts_neu(j,i)-ref_neu(j),j=1,3), 
     .           (ts_neu_std(j,i),j=1,6),
     .            ts_type(i)
 300         format(1x,i4,i2.2,i2.2,1x,i2.2,i2.2,i2.2,1x,F10.4,
     .           3F15.5,3F9.5,3F7.3,3x,2F16.10,1x,F10.5,3x,
     .           3(F9.5,1x),1x,3F9.5,3F7.3,1x,a) 
          else
             write(unit,310) date, nint(sec), ts_mjd(i),
     .           (ts_xyz(j,i),j=1,3), (ts_xyz_std(j,i),j=1,6),
     .           (ts_llu(j,i),j=1,3),
     .           (ts_neu(j,i)-ref_neu(j),j=1,3), 
     .           (ts_neu_std(j,i),j=1,6),
     .            ts_type(i)
 310         format(1x,i4,i2.2,i2.2,1x,i2.2,i2.2,i2.2,1x,F10.4,
     .           3F15.5,3F9.5,3F7.3,3x,2F16.10,1x,F10.5,3x,
     .           3(F9.3,1x),1x,3F9.5,3F7.3,1x,a) 
          endif


      end do

****  Thats all 
      return

      end

CTITLE CTS_MAG

      real*8 function CTS_mag(NEU, Ref)

      implicit none

*     routine to compute magnitude of max element
      real*8 NEU(3), Ref(3)
      real*8 dNEU(3)
      integer*4 i

      CTS_mag = 0.d0
      do i = 1,3
         dneu(i) = NEU(i)-REF(i)
         if( abs(dneu(i)).gt.CTS_mag ) CTS_mag = abs(dneu(i))
      end do

      return
      end

CTITLE REMOVE_EJMP

      subroutine remove_ejmp(ns)

*     Subroutine to remove east jumps that can occur when a site
*     moves too far in latitude.  Usually only a problem for ice
*     sites.  Here we compare the reference lat with the latitude
*     in the individual entries

      include '../includes/const_param.h'
      include 'tssum.h'

      integer*4 ns  ! code site number

      integer*4 i

      real*8 locref(3), locdat(3)  ! Geod Co-lat, long and heigt
                                   ! with reference latitude and 
                                   ! day value of latitude
      real*8 rot(3,3)
      real*8 neuref(3), neudat(3)  ! NEU values for reference and
                                   ! daily latiude.  If no latitude
                                   ! induced East jump, then should
                                   ! be the same
      real*8 dEast, old_dEast      ! East change and previous east change
                                   ! (latter used for output)
*
***** Get the reference positions for this site.
      call XYZ_to_GEOD(rot,ref_xyz, ref_llu) 

*     Loop over entries finding the one for this site
      old_dEast = 0.0d0


      do i = 1, num_ent
         if( in_cs(i).eq.ns) then
*           Test to see if change.  Call loc_to_geod with
*           actual and refence latitude
            locdat(1) = pi/2-in_llu(1,i)*pi/180
            locref(2) = in_llu(2,i)*pi/180
            locdat(2) = in_llu(2,i)*pi/180
            locref(3) = in_llu(3,i)
            locdat(3) = in_llu(3,i)
*           Now change reference lat in locref
            locref(1) = ref_llu(1)
*           Convert to NEU
            call loc_to_geod(locref, neuref)
            call loc_to_geod(locdat, neudat)
c            print *,' Ref ',i, locref, neuref
c            print *,' Dat ',i, locdat, neudat

*           Get the East difference
            dEast = neuref(2)-neudat(2)
            if( abs(dEast).gt.1.d-4 ) then
               in_neu(2,i) = in_neu(2,i)+dEast
            endif
            if( abs(dEast-old_dEast).gt.1.d-2) then
               write(*,220) in_code(ns), in_mjd(i), dEast
 220           format('East Offset at ',a4,' MJD ',F12.4,
     .                ' dEast ',F15.3,' m')
            endif
            old_dEast = dEast
         endif
       end do

*****  Thats all
       return 
       end







*     DECLARATIONS of tssum
      integer*4 max_ent   ! Maximum number of total entries
      integer*4 max_site  ! Maximum number of sites
      integer*4 max_ts    ! Maximum number of entries per site

      character*(*) ts_ver   ! Version of time series files

      parameter ( max_ent  = 5000000 )
      parameter ( max_site =    2048 )
      parameter ( max_ts   =   10000 )
*
* MOD TAH 051129: Added version 1.0.1: Version number in file and type 
*     designation (rapid/final)
      parameter ( ts_ver   = '1.0.1' )

* Declaratons
      integer*4 num_ent, num_site, num_code, num_ts

* Data records from .org files
      integer*4 in_ns(max_ent), in_cs(max_ent)
      integer*4 ln_tsdir, ln_prod_id

      integer*4 date_rel(5)
      real*8    sec_rel

      real*8 in_mjd(max_ent), in_xyz(3,max_ent), in_xyz_std(6,max_ent),
     .       in_llu(3,max_ent), 
     .       in_neu(3,max_ent),in_neu_std(6,max_ent) 

      real*8 ts_mjd(max_ts), ts_xyz(3,max_ts), ts_xyz_std(6,max_ts),
     .       ts_llu(3,max_ts), 
     .       ts_neu(3,max_ts),ts_neu_std(6,max_ts) 

      real*8 sv_mjd, sv_xyz(3), sv_xyz_std(6),
     .       sv_llu(3), 
     .       sv_neu(3),sv_neu_std(6) 

      real*8 ts_first, ts_last

      real*8 ref_xyz(3), ref_llu(3), ref_neu(3)

      character*8  in_site(max_site)
      character*4  in_code(max_site), ts_code
      character*128 tsdir, prod_id
      character*5  ts_type(max_ts)     ! Based on prod_id, rapid/final and any
new
                                ! type passed in the prod_id.  Normally updated
from
                                ! the value read in.
     .,            sv_type
     .,            ts_ref_type  ! New reference type based on prod_id


      character*128 in_file, ts_file
      character*16 in_full(max_site), ts_full

      character*16 ts_ver_read

      logical ts_refresh, new_ts


      common / ts_i4 / num_ent, num_site, num_code, num_ts,
     .      in_ns, in_cs, date_rel, ln_tsdir, ln_prod_id,
     .      ts_refresh, new_ts

      common / ts_r8 /sec_rel,  in_mjd, in_xyz, in_xyz_std,
     .       in_llu, in_neu,in_neu_std, ts_mjd, ts_xyz, ts_xyz_std,
     .       ts_llu, ts_neu,ts_neu_std, ts_first, ts_last, 
     .       ref_xyz, ref_llu, ref_neu, 
     .       sv_mjd, sv_xyz, sv_xyz_std, sv_llu, sv_neu,sv_neu_std 

      common / ts_ch /in_site,in_code, ts_code, tsdir, 
     .       prod_id, in_file, ts_file, in_full, ts_full, ts_ver_read,
     .       ts_type, sv_type, ts_ref_type

*---------------------------------------------------------------------
*                                                     CONST_PARAM.FTNI
*     This include file gives all of the constants which are used
*     in the Kalman filter processing software.
*
*     T.Herring                   12:41 PM  TUE., 13  JAN., 1987
*---------------------------------------------------------------------


*   earth_flat  - Earth's flattening
*   earth_rad   - Equatorial radius of the Earth (m) -- Also the
*               - semi-major-axis of the ellipsoid.
*   earth_to_moon   - Mass ratio of earth and moom
*   g_earth     - Gravitional acceleration at the equator (m/s**2)
*   GM_moon     - GM for moon
*   GM_sun      - GM for sun
*   GM_earth    - GM for Earth 
*   G_univ      - Gravitional constant
*   pi          - PI
*   rad_to_deg  - Conversion from radians to degs.
*   rad_to_mas  - Conversion from radians to milliarcsecs.
*   sec_per_day - Number of seconds in 24 hours
*   vel_light   - speed of light in m/s
*   DJ2000      - Julian date of J2000
*   sec360      - number of seconds in 360 degreees.
*   solar_to_sidereal   - Conversion from solar days to sidereal
*                       - days (at J2000)
*   fL1, fL2    - GPS frequencies in Hz at L1 and L2

*   dfsf, sfdf  - Difference of frequency divided by the sum of
*               - frequencies (used form widelane and
*               - narrowlane)
*   lcf1, lcf2  - Multipliers for LC from L1 and L2 frequencies
*   lgf1, lgf2  - Multipliers for LG from L1 and L2 frequencies
*   pcf1, pcf2  - Multipliers for PC from P1 and P2 frequencies

      real*8 earth_flat, earth_rad, earth_to_moon, g_earth, 
     .    GM_earth, GM_moon, GM_sun, G_univ,
     .    pi, rad_to_deg, rad_to_mas, sec_per_day,
     .    vel_light, DJ2000, sec360, solar_to_sidereal, fL1, fL2

      real*8 dfsf, sfdf, lcf1, lcf2, lgf1, lgf2, pcf1, pcf2

*     Values for the parameters

C     parameter ( earth_flat    = 0.003352891869D0     )
*                                                        ! m
C     parameter ( earth_rad     = 6378145.D0           )

* WGS-84 parameters for the elliposoid (a and 1/f)
      parameter ( earth_rad     = 6378137.D0           )
      parameter ( earth_flat    = 1.d0/298.257222101d0 )

      parameter ( earth_to_moon = 81.30065918D0        )
*                                                        ! m/sec**2
      parameter ( g_earth       =  9.780318458D0       )
*                                                        ! m**3/sec**2
      parameter ( GM_moon       = 0.49027975D+13       )
*                                                        ! m**3/sec**2
      parameter ( GM_sun        = 0.132712499D+21      )
*                                                        ! m**3/sec**2
* IERS Value 3.986004418d+14; solve value 3.9860346D+14
      parameter ( GM_earth      = 3.986004418d+14      )
*                                                        ! m**2/(kg sec**2)
      parameter ( G_univ        = 0.66732D-10          )
      parameter ( pi            = 3.1415926535897932D0 )
      parameter ( sec_per_day   = 86400.D0             )
*                                                        ! m/s
      parameter ( sec360            = 1296000.d0       )
      parameter ( vel_light     = 299792458.D0         )
*                                                        ! Julian days
      parameter ( DJ2000        = 2451545.d0           )

      parameter ( solar_to_sidereal = 1.002737909d0 )

      parameter ( fL1 = 154*10.23d6 )    
      parameter ( fL2 = 120*10.23d6 )    

*     Computed quanities

      parameter ( rad_to_deg    = 180.d0   /pi         )
      parameter ( rad_to_mas    = 648000.d3/pi         )

      parameter ( dfsf = (fL1-fL2)/(fL1+fL2) )
      parameter ( sfdf = (fL1+fL2)/(fL1-fL2) )

      parameter ( lcf1 = 1.d0/(1.d0 - (fL2/fL1)**2) )
      parameter ( lcf2 = -(fL2/fL1)/(1.d0 - (fL2/fL1)**2) )

      parameter ( lgf1 = -fL2/fL1)
      parameter ( lgf2 = 1.d0 )

      parameter ( pcf1 =  fL1**2/(fL1**2-fL2**2) )
      parameter ( pcf2 = -fL2**2/(fL1**2-fL2**2) )


-- 


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug tree-optimization/37310] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
                   ` (9 preceding siblings ...)
  2008-09-02 12:12 ` [Bug tree-optimization/37310] " petermorgan at grapevine dot net dot au
@ 2008-09-02 16:58 ` sgk at troutmask dot apl dot washington dot edu
  2008-09-02 22:46 ` petermorgan at grapevine dot net dot au
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sgk at troutmask dot apl dot washington dot edu @ 2008-09-02 16:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from sgk at troutmask dot apl dot washington dot edu  2008-09-02 16:57 -------
Subject: Re:  gfortran errors in compilation and the making for upgraded
compilers

On Tue, Sep 02, 2008 at 12:11:23PM -0000, petermorgan at grapevine dot net dot
au wrote:
> 
> gfortran -O -Wuninitialized -fno-automatic -fno-backslash tssum.f  
> ../gen_util/gen_util_lib.a ../../libraries/matrix/kinv_lib.a 
> ../../libraries/comlib/com_lib.a  -o tssum
> tssum.f: In function 'remove_ejmp':
> tssum.f:712: internal compiler error: in set_uids_in_ptset, at 
> tree-ssa-structalias.c:4789

I cannot reproduce this problem with

troutmask:sgk[225] gfortran42 --version
GNU Fortran (GCC) 4.2.5 20080702 (prerelease)

troutmask:sgk[226] gfortran43 --version
GNU Fortran (GCC) 4.3.2 20080717 (prerelease)

troutmask:sgk[227] gfc4x --version
GNU Fortran (GCC) 4.4.0 20080829 (experimental) [trunk revision 139774]

Of coures, I can only do a compile test because I do not
have the source code for the kinv_lib.a so I can't link
a final executable. 

Can you email me off-list a gzipped tar ball of all the need files?


-- 


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug tree-optimization/37310] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
                   ` (10 preceding siblings ...)
  2008-09-02 16:58 ` sgk at troutmask dot apl dot washington dot edu
@ 2008-09-02 22:46 ` petermorgan at grapevine dot net dot au
  2008-09-03  5:12 ` petermorgan at grapevine dot net dot au
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: petermorgan at grapevine dot net dot au @ 2008-09-02 22:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from petermorgan at grapevine dot net dot au  2008-09-02 22:45 -------
Subject: Re:  gfortran errors in compilation
 and the making for upgraded compilers

I have attached a distro copy of kf, the parent module, it contains the 
following

                                         kf
                                          !
                                          !
                      --------------------------------------------
                        !             !          !        !
                   includes                       blsum
                                                          !
                                               ----------------------------
                                                 !                
!           !
                                              tssum.f     tssum.h


I also attach a distro copy of the libraries which is where the library
kinv_lib.a resides


                            libraries
                                 !
                                 !
           -------------------------------------------------------
              !                      !                           !
     Makefile.config                                 matrix
                                                                 !
                                  ---------------------------------------
                                      !              !                   
   !
                                                kinv_lib.a


Makefile.config is where we set all the machine and system dependencies 
that are specific to our needs. The location of the X-development 
libraries and the compiler options are set here. X86_64 stuff is one of 
our current issues and so my Makefile.config is now a little different. 
Recommend defaults if you need to answer or modify stuff here.


I have also attached the install software script and the com libraries  
to complete the info. The com libraries are where the make_gamit and 
make_kf scripts are located. You do not need to make gamit. It is 
independent of kf but both packages access the libraries and other 
common facilities.

This may be overload to you so I will see if I can get a cut down 
version for you.

Regards

sgk at troutmask dot apl dot washington dot edu wrote:
> ------- Comment #11 from sgk at troutmask dot apl dot washington dot edu  2008-09-02 16:57 -------
> Subject: Re:  gfortran errors in compilation and the making for upgraded
> compilers
>
> On Tue, Sep 02, 2008 at 12:11:23PM -0000, petermorgan at grapevine dot net dot
> au wrote:
>   
>> gfortran -O -Wuninitialized -fno-automatic -fno-backslash tssum.f  
>> ../gen_util/gen_util_lib.a ../../libraries/matrix/kinv_lib.a 
>> ../../libraries/comlib/com_lib.a  -o tssum
>> tssum.f: In function 'remove_ejmp':
>> tssum.f:712: internal compiler error: in set_uids_in_ptset, at 
>> tree-ssa-structalias.c:4789
>>     
>
> I cannot reproduce this problem with
>
> troutmask:sgk[225] gfortran42 --version
> GNU Fortran (GCC) 4.2.5 20080702 (prerelease)
>
> troutmask:sgk[226] gfortran43 --version
> GNU Fortran (GCC) 4.3.2 20080717 (prerelease)
>
> troutmask:sgk[227] gfc4x --version
> GNU Fortran (GCC) 4.4.0 20080829 (experimental) [trunk revision 139774]
>
> Of coures, I can only do a compile test because I do not
> have the source code for the kinv_lib.a so I can't link
> a final executable. 
>
> Can you email me off-list a gzipped tar ball of all the need files?
>
>
>   

-- 
***************************************
*                                     *
*  Peter and Carol Morgan             *
*  20 Goodparla St                    *
*  Hawker, ACT, 2614                  *
*  Australia                          *
*                                     *
* Home Phone      +61 (0)2 6254 0137  *
* Peter's Mobile  +61 (0)4 1854 0137  *
*                                     *
*                                     *
***************************************


#!/bin/csh

# Script to install GAMIT and GLOBK, starting from compressed tarfiles
# of the directories.   R. King 21 August 1996.  
# Last changed by S. McClusky 29 Septebmer 2000 
# Last changed by R. King 3 October 2000
# Last changed for incremental updates by S. McClusky and R. King 27 February
2001

##################### SET UP DEFAULTS #############################   
set mypath = `pwd`
set compiler = ''
set install_exe = 'no'
set exe_files = ''
set help = 'no'

##################### DECIPHER COMMAND LINE #######################   
while ($#argv > 0 )
  set input = ( $argv )
  switch($input[1])
    case -h*:
      set help = yes 
    breaksw 
    case -c:
      set compiler = $argv[2] 
    breaksw 
    case -exe:
       set install_exe='yes'
    breaksw
  endsw
  if ( $#argv > 0 ) shift argv
end
alldone:
##################### GET THE JOB DONE ############################
# Any help required
if ( $help == 'yes') then 
  echo "The install_software script will install the GAMIT/GLOBK software in:
${mypath}."
  echo "Prior to running this script the user must have downloaded the
gamit/globk distribution."
  echo " "
  echo "Options accepted by install_software are:"
  echo " "
  echo "-c compiler"
  echo "-exe"
  echo " "
  echo "Where :-"
  echo "       -c compiler is set only if the user does NOT want to build "
  echo "       the GAMIT/GLOBK software using the default gfortran compiler,"
  echo "       but instead using some other compiler . The file "
  echo "       ${mypath}/libraries/Makefile.config MUST still be "
  echo "       modified manually to reflect this new compiler selection and "
  echo "       the necessary compiler flags. "
  echo " "
  echo "       -exe is used if the user wants to only install the precompiled
executables "
  echo "       and necessary auxillary files needed to run GAMIT and GLOBK. "
  exit
endif

# Unpack distribution and ask the user some setup questions. 
echo " "
echo GAMIT and GLOBK to be installed into $mypath  
echo " "
echo "If you need help with command line options type CTL_C now and type "
echo "install_software -help on the command line"
echo "  "
echo "The compressed tarfiles will be removed after extraction of the "
echo "directories, but except for that, the script may be stopped and"
echo "rerun safely from any point.  Tarfiles to be uncompressed:" 
echo " "  
set files = `ls *.Z *.gz *.tar | grep -v "incremental_updates" | grep -v "exe"`
echo "    $files"
echo " "    
echo "Continue ? (y/n)"
set ans = $<
if ( $ans == '' ) set ans = 'y'
if ( $ans == 'n' ) exit

echo " "
echo ".. uncompressing and extracting the directories:"
echo " "  
foreach f ($files)
   if ( -e $f ) then 
     if ( $f:e == 'Z' ) then
       zcat $f | tar -xvf -  
     else if ( $f:e == 'gz' ) then
       gunzip -c $f | tar -xvf -
     else if ( $f:e == 'tar' ) then
       tar -xvf $f
     else
       echo "Unknown file type $f NOT extracted"
     endif 
     \rm -f $f 
   endif
end 

# Apply incremental updates if required
set inc_updates_file = ''
set inc_updates_file = `ls incremental_updates*.Z incremental_updates*.gz
incremental_updates*.tar |& grep -v "No match"`
if ( $#inc_updates_file > 0 ) then
  echo " "
  echo "Do you want to apply incremental updates: $inc_updates_file"
  echo "Continue ? (y/n)"
  set ans = $<
  if ( $ans == '' ) set ans = 'y'
  if ( $ans == 'y' ) then
    echo ".. applying incremental updates:"
    foreach f ($inc_updates_file)
      if ( -e $f ) then 
        if ( $f:e == 'Z' ) then
          zcat $f | tar -xvf -  
        else if ( $f:e == 'gz' ) then
          gunzip -c $f | tar -xvf -
        else if ( $f:e == 'tar' ) then
          tar -xvf $f
        else
          echo "Unknown file type $f NOT extracted"
        endif 
        \rm -f $f 
      endif
    end
  endif
endif

#Install executables if requested.
if ( $install_exe == "yes" ) then
  echo "Installing precompiled gamit and globk executables into ${mypath}/bin"
  set exe_files = `ls *exe*.Z *exe*.gz *exe*.tar |& grep -v "No match"`
  if ( $#exe_files > 0 ) then
    echo "Executable files to be installed are: $exe_files"
    mkdir bin
    pushd bin
    foreach f ($exe_files)
      if ( -e ../$f ) then 
        if ( ../$f:e == '../Z' ) then
          zcat ../$f | tar -xvf -  
        else if ( ../$f:e == '../gz' ) then
          gunzip -c ../$f | tar -xvf -
        else if ( ../$f:e == '../tar' ) then
          tar -xvf ../$f
        else
          echo "Unknown file type $f NOT extracted"
        endif 
        \rm -f $f 
      endif
    end
    popd
  else
    echo "No executable tar files found in ${mypath} directory. Stopping
intallation"
    exit
  endif

else
# Allow the user to check that the correct gfortran compiler flag options are
setup.
  if ( $compiler != '' ) then
    echo " "
    echo "================================"  
    echo "Using compiler option: $compiler" 
    echo "================================"
    echo " "
    echo "Have you checked that the compiler flag options in the assignment
block "
    echo "of the ./libraries/Makefile.config for your particular hardware/OS
type "
    echo "are correctly set for gfortran? "
    echo " "
    echo "If NOT stop now, and make the compiler flag options assignment block
for your"
    echo "particular hardware/OS type in ./libraries/Makefile.config. the same
as the"
    echo "compiler flag options assignment block for Linux. (Only the 4 lines
defining"
    echo "compilers and compiler flags need to be modified)."
    echo " "    
    echo "Continue ? (y/n)"
    set ans = $<
    if ( $ans == '' ) set ans = 'y'
    if ( $ans == 'n' ) exit
  endif

  echo " "  
  echo ".. adding $mypath/com to your search path to continue installation"
  set path = ($mypath/com $path)
  echo " "
  echo "To execute GAMIT and GLOBK you will need to set your login path to"
  echo "include $mypath/com $mypath/gamit/bin $mypath/kf/bin "     
  echo " "
  echo "You will also need the alias or link gg --> $mypath"
  echo " " 

  set system = `uname -a | awk '{print $1, $3}'`  
  set awktype = `which awk | awk '{print $NF}'`  
  echo ' '
  echo 'Your Operating System type is:' $system[1]
  echo 'Your default awk version is:' $awktype
  if ( $system[1] == "SunOS" ) then
    set posixawk = `echo POSIX | awk -v temp=$awktype '{print $1}'`  
    if ( $posixawk != 'POSIX' ) then 
      echo 'When using Solaris GAMIT/GLOBK scripts require POSIX standard
/usr/xpg4/bin/awk '
      echo 'On Solaris, the standard awk in /usr/bin is not POSIX-compliant so
you must, ' 
      echo 'force use of  /usr/xpg4/bin/awk.  This can be done by putting a
link into '
      echo '/gamit/bin and making sure that /gamit/bin precedes /usr/bin in
your path.'
      echo 'You must use a link rather than an alias in .cshrc because when you
execute ' 
      echo 'a script with the -f option your .cshrc is not sourced, so the
script is run ' 
      echo 'using a default shell. '
      exit
    endif
  endif 

  set conf = libraries/Makefile.config
  set conf_xlibpath = (`grep -v "#" $conf | grep "X11LIBPATH" | cut -d" " -f2`) 
  set conf_xincpath = (`grep -v "#" $conf | grep "X11INCPATH" | cut -d" " -f2`) 
  echo " "
  echo "These are the default paths to X11 found in Makefile.config"
  echo "X11LIBPATH: $conf_xlibpath"
  echo "X11INCPATH: $conf_xincpath"
  echo " "
  echo "Searching your system for X11 installation"
  set xincpath = `find /usr -name Xlib.h   -print |& grep -v Permission | awk
-F/ '{for (i=2;i<=NF-1;i++) printf "%s","/"$i; printf "\n"}'` >& /dev/null 
  set xlibpath = `find /usr -name libX11.a -print |& grep -v Permission | awk
-F/ '{for (i=2;i<=NF-1;i++) printf "%s","/"$i; printf "\n"}'` >& /dev/null
  echo "Found these paths to X11 libs and includes on your system"
  echo "X11LIBPATH:  $xlibpath"
  echo "X11INCPATH:  $xincpath"
  echo " "
  if ( $#xlibpath > 1 || $#xincpath > 1 ) then
    echo 'Found multiple paths to X11. I dont know which to choose.'
    echo "You should set X11LIBPATH X11INCPATH in the Makefile.config
manually."
    echo " "
    set ans = n
    goto skip
  endif 
  echo 'Are these correct for your system?'
  echo "Continue? (y/n)"
  set ans = $< 
  skip:
  if ( $ans == '' ) set ans = 'y'
  if ( $ans == 'y') then
# Set X11LIBPATH
    set n = `grep -n "X11LIBPATH" $conf | grep -v "#" | awk -F: '{print $1}'`
    @ n = $n - 1
    head -n +$n $conf >! ${conf}.new
    echo "X11LIBPATH $xlibpath" >> ${conf}.new 
    @ n = $n + 2
    tail -n +$n $conf >> ${conf}.new
    \mv ${conf}.new ${conf}      

# Set X11INCPATH
    set n = `grep -n "X11INCPATH" $conf | grep -v "#" | awk -F: '{print $1}'`
    @ n = $n - 1
    head -n +$n $conf >! ${conf}.new
    echo "X11INCPATH $xincpath" >> ${conf}.new 
    @ n = $n + 2
    tail -n +$n $conf >> ${conf}.new
    \mv ${conf}.new ${conf}

  else if ( $ans == 'n' ) then
    echo 'Are the defaults found in Makefile.config correct?'
    echo 'If NOT edit the Makefile.config now before choosing to contine' 
    echo "Continue? (y/n)"
    set ans = $<
    if ( $ans == '' ) set ans = 'y'
    if ( $ans == 'n' ) then
      echo "You need to go and edit the Makefile.config by hand"
      exit
    endif
  endif

  echo " "        
  set maxsit = `grep "MAXSIT" $conf`; shift maxsit
  set maxsat = `grep "MAXSAT" $conf`; shift maxsat
  set maxatm = `grep "MAXATM" $conf`; shift maxatm
  set maxepc = `grep "MAXEPC" $conf`; shift maxepc  
  echo "GAMIT dimensions in /libraries/Makefile.config are set to "  
  echo "  maxsit = " $maxsit
  echo "  maxepc = " $maxepc
  echo "  maxatm = " $maxatm
  echo "  maxsat = " $maxsat
  echo " "
  echo 'Are these defaults found in Makefile.config correct?'
  echo 'If NOT edit the Makefile.config now before choosing to contine' 
  echo "Continue ? (y/n)"
  set ans = $<
  if ( $ans == '' ) set ans = 'y'
  if ( $ans == 'n' ) exit

  echo " "
  echo "  .. removing any existing Makefiles or archive files from libraries
directories"
  rmfresh -p $mypath -d libraries -M -ao   

  echo " "
  echo "  .. removing any existing Makefiles or archive files from gamit
directories"
  rmfresh -p $mypath -d gamit -M  -ao
  echo " "
  echo "  .. making libraries and gamit"
  make_gamit $mypath $compiler 
  if( $status != 0 ) then
    echo "Failure in make_gamit -- install_software terminated" 
    exit  
  endif

  echo " "
  echo "  .. removing any existing Makefiles or archive files from kf
directories"
  rmfresh -p $mypath -d  kf -M -ao
  echo " "
  echo "  .. making globk modules in kf directories"
  make_globk $mypath  $compiler
  if( $status != 0 ) then
    echo "Failure in make_globk -- install_software terminated"   
    exit
  endif
endif
#Finish up by guiding the user through required environment settings required.
echo "Create the gg link in your home directory to the version of "
echo "gamit/globk you just installed ? (y/n)"
echo " "    
set ans = $<
if ( $ans == '' ) set ans = 'y'
if ( $ans == 'y' ) then
  echo 'Making required ~/gg link to newly installed software'
  echo "ln -s -f ${mypath} ~/gg"
  \rm -rf ~/gg
  ln -s -f ${mypath} ~/gg
  echo " "
endif
if ( $install_exe == "yes" ) then
  echo "Don't forget to set your : path to include $mypath/bin" 
else
  echo "Don't forget to set your : path to include $mypath/gamit/bin and
$mypath/kf/bin " 
endif
echo "                         : HELP_DIR environment variable in you shell
profile" 
echo "                           (in .cshrc/.tcshrc add: setenv HELP_DIR
${mypath}/help/)"
echo "                         : INSTITUTE evnironment variable in your shell
profile" 
echo "                           (in your .cshrc/.tcshrc add: setenv INSTITUTE
where_i_work)"
echo "                           where_i_work is a 3 character identifier for
your solutions"

exit


-- 


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug tree-optimization/37310] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
                   ` (11 preceding siblings ...)
  2008-09-02 22:46 ` petermorgan at grapevine dot net dot au
@ 2008-09-03  5:12 ` petermorgan at grapevine dot net dot au
  2008-09-06 23:08 ` [Bug tree-optimization/37310] [4.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: petermorgan at grapevine dot net dot au @ 2008-09-03  5:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from petermorgan at grapevine dot net dot au  2008-09-03 05:10 -------
Created an attachment (id=16199)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16199&action=view)
a runable fragment that generates the error when compiled with optimization

tssumc00.f is a standalone fragment of tssum with include file contents
inserted. It is a minimal piece of code that generates the compiler error when
compiled with optimization and compiles to clean code when optimization is
turned off.


-- 


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug tree-optimization/37310] [4.3 Regression] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
                   ` (12 preceding siblings ...)
  2008-09-03  5:12 ` petermorgan at grapevine dot net dot au
@ 2008-09-06 23:08 ` pinskia at gcc dot gnu dot org
  2008-09-07 23:58 ` petermorgan at grapevine dot net dot au
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-06 23:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from pinskia at gcc dot gnu dot org  2008-09-06 23:06 -------
Reduced testcase:
      real*8 in_mjd(5000000), in_xyz_std(6,5000000)
      real*8 ref_xyz(3), ref_llu(3), ref_neu(3)
      common / ts_r8 /sec_rel, in_mjd, in_xyz_std, ref_llu, ref_neu
      real*8 locref(3)
        locref(1) = ref_llu(1)
        call loc_to_geod(locref, neuref)
        write(*,*) in_mjd(i)
       end
--- CUT ---
Works on the trunk.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |4.2.0
      Known to work|                            |4.4.0
   Last reconfirmed|0000-00-00 00:00:00         |2008-09-06 23:06:52
               date|                            |
            Summary|gfortran errors in          |[4.3 Regression] gfortran
                   |compilation and the making  |errors in compilation and
                   |for upgraded compilers      |the making for upgraded
                   |                            |compilers
   Target Milestone|---                         |4.3.3


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug tree-optimization/37310] [4.3 Regression] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
                   ` (13 preceding siblings ...)
  2008-09-06 23:08 ` [Bug tree-optimization/37310] [4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2008-09-07 23:58 ` petermorgan at grapevine dot net dot au
  2008-09-08  0:44 ` petermorgan at grapevine dot net dot au
  2008-09-17 14:35 ` rguenth at gcc dot gnu dot org
  16 siblings, 0 replies; 18+ messages in thread
From: petermorgan at grapevine dot net dot au @ 2008-09-07 23:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from petermorgan at grapevine dot net dot au  2008-09-07 23:56 -------
Subject: Re:  [4.3 Regression] gfortran errors
 in compilation and the making for upgraded compilers

Dear Andrew

Thanks message below. Unfortunately this is not the correct test case. 
The test case involves  involves the routine tssum.

I will redo the test case in case there are difficulties with the test 
module.

regards and thanks

peter

pinskia at gcc dot gnu dot org wrote:
> ------- Comment #14 from pinskia at gcc dot gnu dot org  2008-09-06 23:06 -------
> Reduced testcase:
>       real*8 in_mjd(5000000), in_xyz_std(6,5000000)
>       real*8 ref_xyz(3), ref_llu(3), ref_neu(3)
>       common / ts_r8 /sec_rel, in_mjd, in_xyz_std, ref_llu, ref_neu
>       real*8 locref(3)
>         locref(1) = ref_llu(1)
>         call loc_to_geod(locref, neuref)
>         write(*,*) in_mjd(i)
>        end
> --- CUT ---
> Works on the trunk.
>
>
>   

-- 
***************************************
*                                     *
*  Peter and Carol Morgan             *
*  20 Goodparla St                    *
*  Hawker, ACT, 2614                  *
*  Australia                          *
*                                     *
* Home Phone      +61 (0)2 6254 0137  *
* Peter's Mobile  +61 (0)4 1854 0137  *
*                                     *
*                                     *
***************************************


-- 


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug tree-optimization/37310] [4.3 Regression] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
                   ` (14 preceding siblings ...)
  2008-09-07 23:58 ` petermorgan at grapevine dot net dot au
@ 2008-09-08  0:44 ` petermorgan at grapevine dot net dot au
  2008-09-17 14:35 ` rguenth at gcc dot gnu dot org
  16 siblings, 0 replies; 18+ messages in thread
From: petermorgan at grapevine dot net dot au @ 2008-09-08  0:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from petermorgan at grapevine dot net dot au  2008-09-08 00:43 -------
Created an attachment (id=16250)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16250&action=view)
An updated code fragment, old version tsummc00.f, showing the compilation
error.

A smaller code fragment to tsummc001.f which also shows the compilation error.
Here is the output from my test starting with with a version call to gfortran
and ending with an error free compilation when there is no optimization.

[peterm@currawong test]$ gfortran -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.3.1.source/configure --prefix=/opt
--with-mpfr-lib=/opt/lib --with-mpfr-include=/opt/include --disable-multilib
Thread model: posix
gcc version 4.3.1 (GCC) 
[peterm@currawong test]$  gfortran -c -O3  tssumd00.f
tssumd00.f: In function 'remove_ejmp':
tssumd00.f:91: internal compiler error: in set_uids_in_ptset, at
tree-ssa-structalias.c:4789
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[peterm@currawong test]$ gfortran -c   tssumd00.f


The extensive parameter lists and common blocks are important. They are
normally invoked by the use of include files. The error in in this test also
occurs in a second place in the suite. In both case there are two include
statement lines. In this module everything is okay when only one include
statement is requested. I am searching for other locations in the suite where
there may be two used of include. This is a relatively slow process. 


-- 

petermorgan at grapevine dot net dot au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #16199|0                           |1
        is obsolete|                            |


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug tree-optimization/37310] [4.3 Regression] gfortran errors in compilation and the making for upgraded compilers
  2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
                   ` (15 preceding siblings ...)
  2008-09-08  0:44 ` petermorgan at grapevine dot net dot au
@ 2008-09-17 14:35 ` rguenth at gcc dot gnu dot org
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-09-17 14:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from rguenth at gcc dot gnu dot org  2008-09-17 14:34 -------
I think this is a duplicate of PR36747 as I no longer can reporduce this with
4.3.2.

*** This bug has been marked as a duplicate of 36747 ***


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to fail|4.2.0                       |4.2.0 4.3.1
      Known to work|4.4.0                       |4.4.0 4.3.2
         Resolution|                            |DUPLICATE


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


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2008-09-17 14:35 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-01 10:20 [Bug fortran/37310] New: gfortran errors in compilation and the making for upgraded compilers petermorgan at grapevine dot net dot au
2008-09-01 14:01 ` [Bug fortran/37310] " jvdelisle at gcc dot gnu dot org
2008-09-01 22:23 ` petermorgan at grapevine dot net dot au
2008-09-01 22:40 ` kargl at gcc dot gnu dot org
2008-09-01 23:14 ` petermorgan at grapevine dot net dot au
2008-09-01 23:23 ` petermorgan at grapevine dot net dot au
2008-09-01 23:32 ` kargl at gcc dot gnu dot org
2008-09-02  0:47 ` petermorgan at grapevine dot net dot au
2008-09-02  2:38 ` petermorgan at grapevine dot net dot au
2008-09-02  3:48 ` kargl at gcc dot gnu dot org
2008-09-02 12:12 ` [Bug tree-optimization/37310] " petermorgan at grapevine dot net dot au
2008-09-02 16:58 ` sgk at troutmask dot apl dot washington dot edu
2008-09-02 22:46 ` petermorgan at grapevine dot net dot au
2008-09-03  5:12 ` petermorgan at grapevine dot net dot au
2008-09-06 23:08 ` [Bug tree-optimization/37310] [4.3 Regression] " pinskia at gcc dot gnu dot org
2008-09-07 23:58 ` petermorgan at grapevine dot net dot au
2008-09-08  0:44 ` petermorgan at grapevine dot net dot au
2008-09-17 14:35 ` rguenth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).