[Bug fortran/33058] New: gfortran compiling and LD_LIBRARY_PATH

2007-08-13 Thread yucj at ghi dot rwth-aachen dot de
When I tried to compile gcc-4.2.1 on Linux to creat the gfortran compiler, it
was failed.

../../Workshop/gfortran/gcc-4.2.1/configure
--prefix=/home/yucj/installs/gfortran4.2.1 --enable-languages=fortran
--with-gmp=/home/yucj/installs/gmp4.2.1
--with-mpfr=/home/yucj/installs/mpfr2.2.1 

The error messages are as follows,

...
updating cache ./config.cache
configure: loading cache ./config.cache
checking for i686-pc-linux-gnu-gfortran...
/home/yucj/installs/gfortran4.2.1/./gcc/gfortran
-B/home/yucj/installs/gfortran4.2.1/./gcc/
-B/home/yucj/installs/gfortran4.2.1/i686-pc-linux-gnu/bin/
-B/home/yucj/installs/gfortran4.2.1/i686-pc-linux-gnu/lib/ -isystem
/home/yucj/installs/gfortran4.2.1/i686-pc-linux-gnu/include -isystem
/home/yucj/installs/gfortran4.2.1/i686-pc-linux-gnu/sys-include
checking whether we are using the GNU Fortran compiler... no
checking whether /home/yucj/installs/gfortran4.2.1/./gcc/gfortran
-B/home/yucj/installs/gfortran4.2.1/./gcc/
-B/home/yucj/installs/gfortran4.2.1/i686-pc-linux-gnu/bin/
-B/home/yucj/installs/gfortran4.2.1/i686-pc-linux-gnu/lib/ -isystem
/home/yucj/installs/gfortran4.2.1/i686-pc-linux-gnu/include -isystem
/home/yucj/installs/gfortran4.2.1/i686-pc-linux-gnu/sys-include accepts -g...
no
checking whether the GNU Fortran compiler is working... no
configure: error: GNU Fortran is not working; the most common reason for that
is that you might have linked it to shared GMP and/or MPFR libraries, and not
set LD_LIBRARY_PATH accordingly. If you suspect any other reason, please report
a bug in http://gcc.gnu.org/bugzilla, attaching
/home/yucj/installs/gfortran4.2.1/i686-pc-linux-gnu/libgfortran/config.log
make[1]: *** [configure-target-libgfortran] Error 1
make[1]: Leaving directory `/home/yucj/installs/gfortran4.2.1'
make: *** [all] Error 2


-- 
   Summary: gfortran compiling and LD_LIBRARY_PATH
   Product: gcc
   Version: 4.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: yucj at ghi dot rwth-aachen dot de
  GCC host triplet: x86_64-unknown-linux-gnu


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



[Bug fortran/33058] gfortran compiling and LD_LIBRARY_PATH

2007-08-13 Thread fxcoudert at gcc dot gnu dot org


--- Comment #1 from fxcoudert at gcc dot gnu dot org  2007-08-13 10:25 
---
As the error message you quote says:

"the most common reason for that is that you might have linked it to shared GMP
and/or MPFR libraries, and not set LD_LIBRARY_PATH accordingly. If you suspect
any other reason, please report a bug in http://gcc.gnu.org/bugzilla";

Do you linked with shared GMP and/or MPFR libraries? In this case, have you set
your LD_LIBRARY_PATH environment variable accordingly? (this would probably be,
in your case, something like "export
LD_LIBRARY_PATH=/home/yucj/installs/gmp4.2.1/lib:/home/yucj/installs/mpfr2.2.1/lib")

Closing as INVALID, please reopen the bug report if you have followed the
instructions and it still doesn't work (providing details about what you have
done exactly to ensure your shared libraries were picked up).


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug c++/33059] New: offsetof calculation not constant in compile time (?)

2007-08-13 Thread kare at modlab dot se
When moving from gcc3.3.3 to gcc4.1.0 the compiler is no longer capable of
calculate value of the offsetof macro expansion. Please find below a bare
minimum of 7 lines of code that compiles fine with gcc3.3.3 and fails on
gcc4.1.0 and gcc4.2.1.   

1. The program compiled: 
--- foo.cc
struct _mbuf_dummy {
  int xxx;
};

const unsigned long x = (const unsigned long) ( &( ((struct _mbuf_dummy *)
0)->xxx ) );

char qq[x]; // error: array bound is not an integer constant

#ifdef MORE
void foo() {
  static char zz[x]; // error: storage size of 'zz' isn't constant
}
#endif
---

2. Trace of the session using gcc4.2.1:
---
[EMAIL PROTECTED]:~> which g++
/home/qkarejo/bin/g++
[EMAIL PROTECTED]:~> g++ foo.cc
foo.cc:7: error: array bound is not an integer constant
[EMAIL PROTECTED]:~> g++ -DMORE foo.cc
foo.cc:7: error: array bound is not an integer constant
foo.cc: In function ‘void foo()’:
foo.cc:11: error: storage size of ‘zz’ isn't constant
[EMAIL PROTECTED]:~> g++ -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/home/qkarejo --enable-languages=c,c++
Thread model: posix
gcc version 4.2.1
[EMAIL PROTECTED]:~>
---

Session with "-### -S" below
---
[EMAIL PROTECTED]:~> gcc -### -S foo.cc
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/home/qkarejo --enable-languages=c,c++
Thread model: posix
gcc version 4.2.1
 "/home/qkarejo/libexec/gcc/x86_64-unknown-linux-gnu/4.2.1/cc1plus" "-quiet"
"-D_GNU_SOURCE" "foo.cc" "-quiet" "-dumpbase" "foo.cc" "-mtune=generic"
"-auxbase" "foo" "-o" "foo.s"
---


-- 
   Summary: offsetof calculation not constant in compile time (?)
   Product: gcc
   Version: 4.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kare at modlab dot se
 GCC build triplet: x86_64-suse-linux
  GCC host triplet: x86_64-suse-linux
GCC target triplet: x86_64-suse-linux


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



[Bug c++/33059] offsetof calculation not constant in compile time (?)

2007-08-13 Thread schwab at suse dot de


--- Comment #1 from schwab at suse dot de  2007-08-13 11:13 ---
The only valid definition of offsetof is in .


-- 

schwab at suse dot de changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug regression/32582] Bootstrap with vectorization enabled fails with ICE on PPC

2007-08-13 Thread rakdver at kam dot mff dot cuni dot cz


--- Comment #26 from rakdver at kam dot mff dot cuni dot cz  2007-08-13 
11:31 ---
Subject: Re:  Bootstrap with vectorization enabled fails with ICE on PPC

> Yesterday, I've tried to check if mainline passes boostrap with vectorization
> enabled on ppc32 using latest mainline.  Since I don't have the access to 
> ppc32
> machine, I've tried to imitate in on ppc64 using the following config:
> 
> ../gcc/configure --build=powerpc-suse-linux --with-cpu=default32
> --prefix=/home/victork/mainline/usr.trunk.127373
> --enable-languages=c,c++,fortran
> 
> Unfortuantely, this bootstrap failed as shown below:
> 
> .
> /home/victork/mainline/build.trunk.127373/./gcc/xgcc
> -B/home/victork/mainline/build.trunk.127373/./gcc/
> -B/home/victork/mainline/usr.trunk.127373/powerpc-suse-linux/bin/
> -B/home/victork/mainline/usr.trunk.127373/powerpc-suse-linux/lib/ -isystem
> /home/victork/mainline/usr.trunk.127373/powerpc-suse-linux/include -isystem
> /home/victork/mainline/usr.trunk.127373/powerpc-suse-linux/sys-include -g -O2
> -ftree-vectorize -maltivec -msoft-float -fPIC -mstrict-align -O2  -O2 -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  -mlong-double-128 -I. -I.
> -I../../.././gcc -I../../../../gcc/libgcc -I../../../../gcc/libgcc/.
> -I../../../../gcc/libgcc/../gcc -I../../../../gcc/libgcc/../include
> -I../../../../gcc/libgcc/../libdecnumber/dpd
> -I../../../../gcc/libgcc/../libdecnumber -I../../../libdecnumber -DHAVE_CC_TLS
> -o _ashldi3.o -MT _ashldi3.o -MD -MP -MF _ashldi3.dep -DL_ashldi3 -c
> ../../../../gcc/libgcc/../gcc/libgcc2.c \
>   -fvisibility=hidden -DHIDE_EXPORTS
> ../../../../gcc/libgcc/../gcc/libgcc2.c: In function '__negdi2':
> ../../../../gcc/libgcc/../gcc/libgcc2.c:80: internal compiler error: in
> push_reload, at reload.c:1288
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See http://gcc.gnu.org/bugs.html> for instructions.
> make[5]: *** [_negdi2.o] Error 1
> make[5]: *** Waiting for unfinished jobs
> 
> 
> Zdenek, David, did you try to test bootstrap with vectoriaztion enabled
> recently?

this is the problem we discussed in this thread before; for now, add
-mabi=altivec to BOOT_CFLAGS to workaround it.


-- 


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



[Bug middle-end/30610] huge memory consumption with -O3

2007-08-13 Thread dberlin at gcc dot gnu dot org


--- Comment #4 from dberlin at gcc dot gnu dot org  2007-08-13 12:06 ---
It takes 2 iterations, but it has come up with 144 thousand expressions


-- 

dberlin at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dberlin at gcc dot gnu dot
   |dot org |org


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



[Bug libstdc++/33060] New: std::tr1::tgamma produces wrong results [for (x-1) in stead of for x]

2007-08-13 Thread fpbeekhof at gmail dot com
The implementation of std::tr1::tgamma looks wrong to me.

Keep in mind that the gamma function is equal to the factorial function for
integer values.

The code blow prints 4 columns:
1) a number, 2) its factorial, computed by hand 3) output using a corrected
version of "Numerical Recipes in C"'s log-gamma function 4) output from
std::tr1::tgamma() function from tr1/cmath

The corrected implementation of NR's gammln() computes the log-gamma of x+1
rather than that of x.

The program's output is then:
 n  n!  exp(NR::gammln(n))  std::tr1::tgamma(n)
1   1   1   1
2   2   2   1
3   6   6   2
4   24  24  6
5   120 120 24
6   720 720 120
7   50405040720
8   40320   40320   5040
9   362880  362880  40320

>From the table, one can see that std::tr1::tgamma(n) lacks the "x+1"
correction.

--- cut here -
#include 
#include 
#include 

template 
T gammln(const T &x)
{
static const T cof [] = {76.18009172947146, -86.50532032941677,
 24.01409824083091, -1.231739572450155,
 0.1208650973866179e-2, -0.5395239384953e-5};

const T y = x + 1.0; // Correction to NR
const T y55 = y+5.5;
const T tmp = y55 - (y+0.5) * std::log( y55 );
T ser = 1.90015e-10;
for (unsigned i = 0; i < 6; ++i)
ser += cof[i] / (y + 1.0 + static_cast(i));

return -tmp + std::log(2.506628274631005 * (1.0 + ser) / y);
}

template 
T factorial(const T &x)
{
T r = 1;
for (unsigned i = 2; i <= x; ++i)
r *= i;

return r;
}

int main()
{
std::cout << " n\tn!\texp(NR::gammln(n))\tstd::tr1::tgamma(n)"
<< std::endl;
for (unsigned i = 1u; i < 10u; ++i)
{
std::cout << i << '\t' << factorial(double(i)) << "\t\t" <<
std::exp(gammln(double(i))) << "\t\t" <<
std::tr1::tgamma(double(i)) << std::endl;

}

return 0;
}

--- cut here -

My gcc version:

Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1
--enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug
--enable-mpfr --enable-checking=release x86_64-linux-gnu
Thread model: posix
gcc version 4.1.3 20070812 (prerelease) (Ubuntu 4.1.2-15ubuntu2)
[EMAIL PROTECTED]:~/work/src/cvmlcpp/trunk/testing$ gcc-4.2 -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
--enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --disable-werror
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.2.1 (Ubuntu 4.2.1-2ubuntu1)

Best,
Fokko Beekhof


-- 
   Summary: std::tr1::tgamma produces wrong results [for (x-1) in
stead of for x]
   Product: gcc
   Version: 4.2.1
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fpbeekhof at gmail dot com


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



[Bug fortran/33058] gfortran compiling and LD_LIBRARY_PATH

2007-08-13 Thread yucj at ghi dot rwth-aachen dot de


--- Comment #2 from yucj at ghi dot rwth-aachen dot de  2007-08-13 12:53 
---
It was solved as your instruction. Thank you.


-- 


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



[Bug regression/32582] Bootstrap with vectorization enabled fails with ICE on PPC

2007-08-13 Thread dje at watson dot ibm dot com


--- Comment #28 from dje at watson dot ibm dot com  2007-08-13 15:17 ---
Subject: Re:  Bootstrap with vectorization enabled fails with ICE on PPC 

Most everyone else bootstraps GCC on PPC64 with
--with-cpu=default32.  Are you missing some packages on SUSE?  This really
isn't a GCC bug any more, it is some problem with the way that you are
configuring and building GCC on your system.


-- 


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



[Bug c++/33061] New: Static variable typed the member type of another class

2007-08-13 Thread kag at graf dot slask dot pl
// this c++ code failes to compile under every gcc/g++ version I know...


#include

template
class foo
{
  private:

  static std::map > data;
  static long long lastId;

  public:

  foo ()
  {
refValid = false;
  }

  foo (const T & v)
  {
lastId++;
ref = data.insert
  (std::pair > (lastId,
  std::pair (v, 0))).first;
refValid = true;
(*ref).second.second++;
  }

  foo (const foo & v)
  {
operator= (v);
  }

  ~foo ()
  {
end ();
  }

  void operator= (const foo & v)
  {
if (&v == this) return;

end ();

ref = v.ref;
refValid = true;
(*ref).second.second++;
  }

  private:

  // g++ fails here:
  std::map >::iterator ref;

  bool refValid;

  void end ()
  {
if (!refValid) return;
(*ref).second.second--;
refValid = false;
  }
};

template
std::map > foo::data;

template
long long foo::lastId = 0;

int main ()
{
  foo x;

  return 0;
}


-- 
   Summary: Static variable typed the member type of another class
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kag at graf dot slask dot pl


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



[Bug regression/32582] Bootstrap with vectorization enabled fails with ICE on PPC

2007-08-13 Thread victork at il dot ibm dot com


--- Comment #27 from victork at il dot ibm dot com  2007-08-13 15:09 ---
> this is the problem we discussed in this thread before; for now, add
> -mabi=altivec to BOOT_CFLAGS to workaround it.

yes, this helped. Still I see a failure in cofigure before stage3 starts:
checking for powerpc-suse-linux-gcc... 
/home/victork/mainline/build.trunk.127373/./prev-gcc/xgcc
-B/home/victork/mainline/build.trunk.127373/./prev-gcc/
-B/home/victork/mainline/usr.trunk.127373/powerpc-suse-linux/bin/
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C
compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

Seemingly, the compiler created by stage 2 is unusable.  I'm not sure if it was
originally a good idea to try to bootstrap ppc32 compiler on ppc64 machine.  Do
you think it is feasible? What should be configuration and bootstrap make
flags?


-- 


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



[Bug fortran/33062] New: ICE in emit_move_insn and expand_call with -fdefault-integer-8

2007-08-13 Thread michael dot a dot richmond at nasa dot gov
gfortran produces an internal compiler error under the following conditions:

1. A logical function is being evaluated
2. The flag "-f-default-integer-8" is specified
3. The August 10 snapshot versions of gcc and gfortran are compiled under
HP-PA. I have not tested this snapshot with other architectures, nor have I
tested the HP-PA architecture with other versions of gcc.

Listed below are two examples:

LOGICAL FUNCTION x()
x = .FALSE.
END FUNCTION x

a.f90: In function 'x':
a.f90:1: internal compiler error: in emit_move_insn, at expr.c:3316
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html> for instructions.

PROGRAM axis
LOGICAL :: x, y
y = x()
END PROGRAM axis

x.f90: In function 'MAIN__':
x.f90:3: internal compiler error: in expand_call, at calls.c:3022
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html> for instructions.


-- 
   Summary: ICE in emit_move_insn and expand_call with -fdefault-
integer-8
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michael dot a dot richmond at nasa dot gov


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



[Bug c++/32992] [4.1/4.2/4.3 Regression] Incorrect code generated for anonymous union and return

2007-08-13 Thread jakub at gcc dot gnu dot org


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2007-08-10 00:51:02 |2007-08-13 16:03:38
   date||


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



[Bug fortran/33062] ICE in emit_move_insn and expand_call with -fdefault-integer-8

2007-08-13 Thread michael dot a dot richmond at nasa dot gov


--- Comment #1 from michael dot a dot richmond at nasa dot gov  2007-08-13 
16:36 ---
This bug does not exist in the i386 version of gfortran


-- 


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



[Bug libstdc++/33060] std::tr1::tgamma produces wrong results [for (x-1) in stead of for x]

2007-08-13 Thread pcarlini at suse dot de


--- Comment #1 from pcarlini at suse dot de  2007-08-13 16:51 ---
First comment: std::tr1::tgamma just forwards to __builtin_tgamma, therefore,
*if* we have an issue is with the middle-end, not with the library. Stay tuned.


-- 


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



[Bug libstdc++/33060] std::tr1::tgamma produces wrong results [for (x-1) in stead of for x]

2007-08-13 Thread pcarlini at suse dot de


--- Comment #2 from pcarlini at suse dot de  2007-08-13 17:00 ---
(In reply to comment #0)
> The implementation of std::tr1::tgamma looks wrong to me.
> 
> Keep in mind that the gamma function is equal to the factorial function for
> integer values.

Now I see: this statement is incorrect, and that's why we don't have an issue.
The real relationship is:

  gamma(m) == (m - 1)!

As you can check here, for example:

  http://en.wikipedia.org/wiki/Gamma_function
  http://mathworld.wolfram.com/GammaFunction.html


-- 

pcarlini at suse dot de changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug fortran/32926] ICE with external function as argument

2007-08-13 Thread pault at gcc dot gnu dot org


--- Comment #5 from pault at gcc dot gnu dot org  2007-08-13 17:15 ---
I am just about to submit the fix.

Thanks for the report.

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |pault at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2007-08-06 09:18:26 |2007-08-13 17:15:07
   date||


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



[Bug c++/33003] missed diagnostic about unused variable.

2007-08-13 Thread pluto at agmk dot net


--- Comment #2 from pluto at agmk dot net  2007-08-13 17:36 ---
$[9.4/2]


-- 

pluto at agmk dot net changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug target/32787] [4.2/4.3 Regression] Sun Studio 12 Undefined symbol addl

2007-08-13 Thread kjetilho at ifi dot uio dot no


--- Comment #7 from kjetilho at ifi dot uio dot no  2007-08-13 17:53 ---
I suggest the patch is made simpler, so that Sun Studio 11 (which doesn't
understand asm at all) can be used for bootstrapping, e.g.:

-#ifdef GCC_VERSION
+#if defined(GCC_VERSION) && !defined(__SUNPRO_C)


-- 

kjetilho at ifi dot uio dot no changed:

   What|Removed |Added

 CC||kjetilho at ifi dot uio dot
   ||no


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



[Bug regression/32582] Bootstrap with vectorization enabled fails with ICE on PPC

2007-08-13 Thread rakdver at kam dot mff dot cuni dot cz


--- Comment #29 from rakdver at kam dot mff dot cuni dot cz  2007-08-13 
18:04 ---
Subject: Re:  Bootstrap with vectorization enabled fails with ICE on PPC

> --- Comment #27 from victork at il dot ibm dot com  2007-08-13 15:09 
> ---
> > this is the problem we discussed in this thread before; for now, add
> > -mabi=altivec to BOOT_CFLAGS to workaround it.
> 
> yes, this helped. Still I see a failure in cofigure before stage3 starts:
> checking for powerpc-suse-linux-gcc... 
> /home/victork/mainline/build.trunk.127373/./prev-gcc/xgcc
> -B/home/victork/mainline/build.trunk.127373/./prev-gcc/
> -B/home/victork/mainline/usr.trunk.127373/powerpc-suse-linux/bin/
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... configure: error: cannot run C
> compiled programs.
> If you meant to cross compile, use `--host'.
> See `config.log' for more details.
> 
> Seemingly, the compiler created by stage 2 is unusable.

this is a misscompilation of crtbegin.o that I have been investigating
as well.  The reason seems to be that with -ftree-vectorize, we
change alignment of __CTOR_LIST__ and __DTOR_LIST__, although why
exactly this causes problems I did not find out yet.


-- 


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



[Bug regression/32582] Bootstrap with vectorization enabled fails with ICE on PPC

2007-08-13 Thread rakdver at gcc dot gnu dot org


--- Comment #30 from rakdver at gcc dot gnu dot org  2007-08-13 18:06 
---
(In reply to comment #28)
> Subject: Re:  Bootstrap with vectorization enabled fails with ICE on PPC 
> 
> Most everyone else bootstraps GCC on PPC64 with
> --with-cpu=default32.  Are you missing some packages on SUSE?  This really
> isn't a GCC bug any more, it is some problem with the way that you are
> configuring and building GCC on your system.

This is a GCC bug. The reason why it was not noticed before is that nobody
bootstraps with vectorization enabled.


-- 


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



[Bug target/31713] Illegal subtraction - symbols from different sections with Solaris as

2007-08-13 Thread kjetilho at ifi dot uio dot no


--- Comment #2 from kjetilho at ifi dot uio dot no  2007-08-13 18:14 ---
It doesn't seem like this patch made it into 4.2.1, at least I can't find any
mention of HAVE_AS_IX86_DIFF_SECT_DELTA in the sources, and the build fails the
same way.  Please reopen bug.  (BTW, would it be possible to download the
patchset mentioned above separately?)


-- 

kjetilho at ifi dot uio dot no changed:

   What|Removed |Added

 CC||kjetilho at ifi dot uio dot
   ||no


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



[Bug target/31713] Illegal subtraction - symbols from different sections with Solaris as

2007-08-13 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2007-08-13 18:20 ---
[andrew-pinskis-computer:local/gcc/gcc] apinski% grep
HAVE_AS_IX86_DIFF_SECT_DELTA config/*/*
config/i386/sol2-10.h:#ifndef HAVE_AS_IX86_DIFF_SECT_DELTA

http://gcc.gnu.org/ml/gcc-cvs/2006-11/msg00056.html

That is because it was fixed for the trunk and not for the 4.2 branch.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|4.2.0   |4.3.0


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



[Bug c++/33061] Static variable typed the member type of another class

2007-08-13 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2007-08-13 18:28 ---
You forgot the typename keyword:
  // g++ fails here:
 std::map >::iterator ref;

Should be:
  // g++ fails here:
  typename std::map >::iterator ref;

After changing that, the program compiles.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug middle-end/31979] ICE compiling openssl-0.9.8e/apps/ocsp.c

2007-08-13 Thread pinskia at gcc dot gnu dot org


--- Comment #8 from pinskia at gcc dot gnu dot org  2007-08-13 18:52 ---
One should note that this is undefined code anyways and most likely will not
work once compiled with this version of GCC.


-- 


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



[Bug c++/27211] Bogus error "template definition of non-template" when there is no non-template

2007-08-13 Thread pcarlini at suse dot de


--- Comment #6 from pcarlini at suse dot de  2007-08-13 19:04 ---
Working on it.


-- 

pcarlini at suse dot de changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |pcarlini at suse dot de
   |dot org |
 Status|NEW |ASSIGNED


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



[Bug preprocessor/33063] New: C++ preprocessor warns about /* in //-comments starting with //*

2007-08-13 Thread trick at icculus dot org
As a minimal example, take the following 3-line file:

--- 8< ---

/*
//*
*/

--- 8< ---

Preprocessing this file with -Wall (using either g++ or cpp directly) results
in the warning '"/*" within comment'.  This only happens if the surrounding /*
*/ pair is present.

(I discovered this in some code that uses separators like this:

//*..

Commenting these off with /* */ results in the bogus warnings.)


-- 
   Summary: C++ preprocessor warns about /* in //-comments starting
with //*
   Product: gcc
   Version: 4.2.1
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: trick at icculus dot org


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



[Bug preprocessor/33063] C++ preprocessor warns about /* in //-comments starting with //*

2007-08-13 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2007-08-13 19:12 ---
And I don't see why it is wrong to warn here because it is /* still as // is
really two tokens and so is /* .


-- 


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



[Bug preprocessor/33063] C++ preprocessor warns about /* in //-comments starting with //*

2007-08-13 Thread trick at icculus dot org


--- Comment #2 from trick at icculus dot org  2007-08-13 20:03 ---
(In reply to comment #1)
> And I don't see why it is wrong to warn here because it is /* still as // is
> really two tokens and so is /* .

Shouldn't //* be treated as '//' followed by '*' though?  Even if not:

// /*
this is not commented out
// */

Since /* */ comments are ineffective within //-comments, there's not any reason
to warn about them there anyway.  All that warning does is cluttering up the
output.


-- 


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



[Bug c/30427] ~ vector float is accepted

2007-08-13 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2007-08-13 20:06 ---
Subject: Bug 30427

Author: pinskia
Date: Mon Aug 13 20:06:15 2007
New Revision: 127396

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127396
Log:
2007-08-13  Andrew Pinski  <[EMAIL PROTECTED]>

PR C/30427
* c-typeck.c (build_unary_op ): Reject vector float
types.

2007-08-13  Andrew Pinski  <[EMAIL PROTECTED]>

PR C/30427
*  gcc.dg/vector-1.c: New test.


Added:
trunk/gcc/testsuite/gcc.dg/vector-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-typeck.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug c/30427] ~ vector float is accepted

2007-08-13 Thread pinskia at gcc dot gnu dot org


--- Comment #4 from pinskia at gcc dot gnu dot org  2007-08-13 20:07 ---
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.3.0


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



[Bug c/30428] vector float | vector float is accepted

2007-08-13 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2007-08-13 20:17 ---
I am testing these patches right now.


-- 


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



[Bug debug/32990] [Regression] gdb has symbol table issues

2007-08-13 Thread drow at gcc dot gnu dot org


--- Comment #6 from drow at gcc dot gnu dot org  2007-08-13 20:29 ---
Sorry, my mistake.  I meant readelf -wi (lowercase I).


-- 


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



[Bug fortran/32827] IMPORT fails for TYPE when also used in INTERFACE

2007-08-13 Thread pault at gcc dot gnu dot org


--- Comment #4 from pault at gcc dot gnu dot org  2007-08-13 20:58 ---
Subject: Bug 32827

Author: pault
Date: Mon Aug 13 20:58:00 2007
New Revision: 127397

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127397
Log:
2007-08-13  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/32827
* decl.c (variable_decl): Check for an imported symbol
by looking for its symtree and testing for the imported
attribute.
(gfc_match_import): Remove change of symbol's namespace
and set the attribute imported instead.
* symbol.c (gfc_get_sym_tree): It is not an error if a
symbol is imported.
* gfortran.h : Add the 'imported' to symbol_attribute.

2007-08-13  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/32827
* gfortran.dg/import6.f90: New test.


Added:
trunk/gcc/testsuite/gfortran.dg/import6.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/symbol.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/32926] ICE with external function as argument

2007-08-13 Thread pault at gcc dot gnu dot org


--- Comment #6 from pault at gcc dot gnu dot org  2007-08-13 21:02 ---
Subject: Bug 32926

Author: pault
Date: Mon Aug 13 21:02:00 2007
New Revision: 127398

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127398
Log:
2007-08-13  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/32926
* match.c (gfc_match_call): Do not create a new symtree in the
case where the existing symbol is external and not referenced.

2007-08-13  Paul Thomas  <[EMAIL PROTECTED]>

PR fortran/32926
* gfortran.dg/external_procedures_3.f90: New test.


Added:
trunk/gcc/testsuite/gfortran.dg/external_procedures_3.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/match.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug fortran/32926] ICE with external function as argument

2007-08-13 Thread pault at gcc dot gnu dot org


--- Comment #7 from pault at gcc dot gnu dot org  2007-08-13 21:03 ---
Fixed on trunk

Paul


-- 

pault at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/32827] IMPORT fails for TYPE when also used in INTERFACE

2007-08-13 Thread pault at gcc dot gnu dot org


--- Comment #5 from pault at gcc dot gnu dot org  2007-08-13 21:04 ---
Fixed on trunk

Paul


-- 


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



[Bug fortran/32827] IMPORT fails for TYPE when also used in INTERFACE

2007-08-13 Thread burnus at gcc dot gnu dot org


--- Comment #6 from burnus at gcc dot gnu dot org  2007-08-13 21:08 ---
Mark really as fixed.


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug debug/32990] [Regression] gdb has symbol table issues

2007-08-13 Thread scovich at gmail dot com


--- Comment #7 from scovich at gmail dot com  2007-08-13 21:10 ---
(In reply to comment #6)
> Sorry, my mistake.  I meant readelf -wi (lowercase I).
> 

Unfortunately, I recompiled with 4.1 to get on with debugging, and also updated
to 20070810 later that day. Now the bug won't cooperate and show up any more.
Maybe the changes over the last three weeks fixed the problem? 

Also unfortunately, I will lose access to the code once my internship ends this
week.  It might be best to close this bug or leave it in WAITING as a
placeholder in case anyone else sees the same thing in an easier-to-replicate
context...


-- 


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



[Bug c/32953] -Wformat warns incorrectly on an unterminated format string of length 1

2007-08-13 Thread dsh at gcc dot gnu dot org


--- Comment #1 from dsh at gcc dot gnu dot org  2007-08-13 21:55 ---
Subject: Bug 32953

Author: dsh
Date: Mon Aug 13 21:55:01 2007
New Revision: 127399

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127399
Log:
gcc/
2007-08-3 1 Dan Hipschman  <[EMAIL PROTECTED]>

PR 32953
* c-format.c (check_format_arg): Move check for zero-length
format strings below the check for unterminated strings.

testsuite/
2007-08-13  Dan Hipschman  <[EMAIL PROTECTED]>

PR 32953
* gcc.dg/format/array-1.c: Add an additional test for
unterminated format strings of length 1.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-format.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/format/array-1.c


-- 


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



[Bug c/32953] -Wformat warns incorrectly on an unterminated format string of length 1

2007-08-13 Thread dsh at gcc dot gnu dot org


--- Comment #2 from dsh at gcc dot gnu dot org  2007-08-13 22:09 ---
Fixed.


-- 

dsh at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug fortran/32926] ICE with external function as argument

2007-08-13 Thread patchapp at dberlin dot org


--- Comment #8 from patchapp at dberlin dot org  2007-08-13 23:00 ---
Subject: Bug number PR32926

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-08/msg00823.html


-- 


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



[Bug fortran/32594] substring simplification leads to ICE

2007-08-13 Thread fxcoudert at gcc dot gnu dot org


--- Comment #6 from fxcoudert at gcc dot gnu dot org  2007-08-13 23:48 
---
A complete patch (for both original problem and a few other ones discovered
while preparing the testcase) was submitted here:
http://gcc.gnu.org/ml/gcc-patches/2007-08/msg00834.html


-- 

fxcoudert at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |fxcoudert at gcc dot gnu dot
   |dot org |org
URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2007-
   ||08/msg00834.html
 Status|NEW |ASSIGNED
   Last reconfirmed|2007-07-04 14:36:19 |2007-08-13 23:48:53
   date||


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



[Bug fortran/32594] substring simplification leads to ICE

2007-08-13 Thread patchapp at dberlin dot org


--- Comment #7 from patchapp at dberlin dot org  2007-08-13 23:50 ---
Subject: Bug number PR32594

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-08/msg00834.html


-- 


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



[Bug middle-end/32758] [4.3 Regression] ecj1 hangs

2007-08-13 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
  Component|java|middle-end
   GCC host triplet|Darwin 8.9.0|
 GCC target triplet||powerpc-darwin
Summary|ecj1 hangs  |[4.3 Regression] ecj1 hangs
   Target Milestone|--- |4.3.0


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



[Bug target/32787] [4.2/4.3 Regression] Sun Studio 12 Undefined symbol addl

2007-08-13 Thread markwright at internode dot on dot net


--- Comment #8 from markwright at internode dot on dot net  2007-08-14 
02:54 ---
Created an attachment (id=14056)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14056&action=view)
Patch to address comment #7.

Thanks for the suggestion.  I think it should use the assembler when
compiling with Sun Studio 12.

I have updated the patch so it will compile with both Sun Studio 11
and Sun Studio 12.  This patch is used to build gcc 4.2.1 on Solaris
in the Open Solaris spec-files-extra project:

http://pkgbuild.svn.sourceforge.net/viewvc/pkgbuild/spec-files-extra/trunk/SFEgcc.spec?view=log
http://pkgbuild.svn.sourceforge.net/viewvc/pkgbuild/spec-files-extra/trunk/patches/gcc-01-bug-32787.diff?view=log

Thanks, Mark


-- 

markwright at internode dot on dot net changed:

   What|Removed |Added

  Attachment #13930|0   |1
is obsolete||


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



[Bug libfortran/33055] ignoring iostat= with -fdefault-integer-8

2007-08-13 Thread jvdelisle at gcc dot gnu dot org


--- Comment #2 from jvdelisle at gcc dot gnu dot org  2007-08-14 05:25 
---
This makes some sense:  The following reduced case works fine with
-fdefault-integer-8 with iostat given and gives an error without it.  I could
argue that this is OK.  I have not dug into the standard on this, but I will.

  integer i
  logical l
  i = 0
  inquire (unit=-42, exist=l, iostat=i)
  if (l) call abort
  end

If this behavior is too weird, we can disable the check for inquire.  More
later...


-- 


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



[Bug regression/32582] Bootstrap with vectorization enabled fails with ICE on PPC

2007-08-13 Thread victork at il dot ibm dot com


--- Comment #31 from victork at il dot ibm dot com  2007-08-14 05:53 ---
> Most everyone else bootstraps GCC on PPC64 with
> --with-cpu=default32.  Are you missing some packages on SUSE?  This really
> isn't a GCC bug any more, it is some problem with the way that you are
> configuring and building GCC on your system.

I think that my system is OK, since I am able to bootstrap with
--with-cpu=default32 without vectorization.

> this is a misscompilation of crtbegin.o that I have been investigating
> as well.  The reason seems to be that with -ftree-vectorize, we
> change alignment of __CTOR_LIST__ and __DTOR_LIST__, although why
> exactly this causes problems I did not find out yet.

Maybe it is somehow related to PR32893 ?


-- 


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