GFortran 44 optimizations and Intel SSE4

Jacob Anderson jwa@beyond-ordinary.com
Tue Nov 1 22:02:00 GMT 2011


Well, we are using "-lstd++" in our link directive - this is a mixed
c++/C/F90 program which is built on MPI. The mpif90 script is used to link
the entire project together.

There is something amiss with the "-O3" option though. It should not change
the link image and cause incompatibility with the std++ library on platform.
We DO have both a 4.1 and 4.4 version of G(cc|fortran) installed. Maybe the
"-O3" is pulling in the 4.1 version of the library. 

In /usr/lib there is an so.8 and so.5 version of libstd++. 

Without the "-O3" option, as mentioned in the other emails, works just fine
- full link and successful production of binary.

-- Jake


> -----Original Message-----
> From: Steve Kargl [mailto:sgk@troutmask.apl.washington.edu]
> Sent: Tuesday, November 01, 2011 2:27 PM
> To: Daniel Franke
> Cc: fortran@gcc.gnu.org; Jacob Anderson
> Subject: Re: GFortran 44 optimizations and Intel SSE4
> 
> On Tue, Nov 01, 2011 at 10:21:28PM +0100, Daniel Franke wrote:
> > On Tuesday 01 November 2011 22:14:43 Jacob Anderson wrote:
> > > If I specify all BUT the -O3, it works fine and I get an executable
> > > without any link errors.
> > >
> > > Only the "-O3" option causes the link errors.
> >
> > -O3 enables a batch of options, see the documentation for details.
> >
> > The link error you quoted
> >
> > > undefined reference to `std::basic_ostream<char,
> > > std::char_traits<char>
> > > >& std::__ostream_insert<char, std::char_traits<char>
> > > >(std::basic_ostream<char, std::char_traits<char> >&, char const*,
> > > long)'
> >
> > is related to C++, not Fortran. You may want to link libstdc++ for
> that.
> >
> 
> Which looks like a bug.  Compiling something with 'gfortran -O3'
> should never require C++ especially its IO routines!
> 
> --
> Steve




More information about the Fortran mailing list