[Bug tree-optimization/23647] [4.0 Regression] Bug w\ while (1) loop and counter variable w\ optimization

2010-09-08 Thread gcc-bugzilla at gcc dot gnu dot org

When a while loop with the true condition (while (1)) contains
an if statement with a modulus evaluated on a counter variable, it
appears that gcc incorrectly optimizes out the modulus check as a
constant (even though the counter variable is updated after the if
statement). If the counter variable is updated _before_ the if
statement, it works properly. Example code is in the how-to-repeat section.

Environment:
System: Linux uktena64 2.6.10-5-amd64-k8 #1 Fri Jun 24 17:08:40 UTC 2005 x86_64
GNU/Linux
Architecture: x86_64


host: x86_64-pc-linux-gnu
build: x86_64-pc-linux-gnu
target: x86_64-pc-linux-gnu
configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-clocale=gnu --enable-debug --enable-java-gc=boehm
--enable-java-awt=xlib --enable-objc-gc --disable-multilib x86_64-linux

How-To-Repeat:
The following code produces the bug (output is 1 1 1 1 ... instead
of 0 1 2 3 ...):
void main() { 
  int i=0;
  while (1) {
if (i%100==0) printf(%d ,i);
i++;
  }
}


--- Comment #1 from Nick at idontproperlyfilloutmyemailaddress dot com  
2005-08-31 03:18 ---
Fix:

If i++; is above the if statement, the code works properly 
(1 2 3 4 ...).


--- Comment #2 from pinskia at gcc dot gnu dot org  2005-08-31 04:55 ---
Fixed at least in 4.0.2 and above.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Component|c   |tree-optimization
   Keywords||wrong-code
 Resolution||FIXED
Summary|Bug w\ while (1) loop and   |[4.0 Regression] Bug w\
   |counter variable w\ |while (1) loop and counter
   |optimization|variable w\ optimization
   Target Milestone|--- |4.0.2


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



[Bug fortran/34633] Compiler crash on FORALL loop

2010-09-08 Thread gcc-bugzilla at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2008-01-01 01:25 ---
That is because it is the same as PR 31217.

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


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE


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



[Bug c++/45510] New: Bug with anonymous unions and bit-fields

2010-09-02 Thread gcc-bugzilla at gcc dot gnu dot org

I have isolated the problem to a very small test program. 

 There are 2 tests in main, testa builds an anonymous union with
bit-fields in it. testb builds a similar anonymous union but this time with a
named structure in it but otherwise identical members.

 testa gives incorrect results (seems to ignore bit-fields). testb
gives correct results. 

 This is the output of the program.

testa
bf0.data=0
bf0.a=0
bf0.b=0
bf0.data=1
bf0.a=1
bf0.b=1
bf0.data=1
bf0.a=1
bf0.b=1
testb
bf0.data=0
bf0.my.a=0
bf0.my.b=0
bf0.data=1
bf0.my.a=1
bf0.my.b=0
bf0.data=3
bf0.my.a=1
bf0.my.b=1

Environment:
System: Linux lc-sj1-2293 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:56:44 EST 2007
x86_64 x86_64 x86_64 GNU/Linux
Architecture: x86_64


host: x86_64-unknown-linux-gnu
build: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
configured with: ./configure
--prefix=/tools/oss/packages/x86_64-rhel4/gcc/4.1.1 --with-gnu-as
--with-as=/tools/oss/packages/x86_64-rhel4/binutils/default/bin/as
--with-gnu-ld
--with-ld=/tools/oss/packages/x86_64-rhel4/binutils/default/bin/ld
--enable-languages=c,c++,objc

How-To-Repeat:

#include iostream
using namespace std;

struct bfa {
  union {
unsigned int a : 1,
   b : 4;
unsigned int data;
  };
};

struct bfb {
  struct my_struct {
unsigned int a : 1,
   b : 4;
  };

  union {
my_struct my;
unsigned int data;
  };
};

void
testa()
{
   cout  __func__  endl;

   bfa bf0;
   bf0.data = 0;

   cout  bf0.data=  hex  bf0.data  endl;
   cout  bf0.a=  bf0.a  endl;
   cout  bf0.b=  bf0.b  endl;

   bf0.a = 1;

   cout  bf0.data=  hex  bf0.data  endl;
   cout  bf0.a=  bf0.a  endl;
   cout  bf0.b=  hex  bf0.b  endl;

   bf0.b = 1;

   cout  bf0.data=  hex  bf0.data  endl;
   cout  bf0.a=  bf0.a  endl;
   cout  bf0.b=  hex  bf0.b  endl;
}

void
testb()
{
   cout  __func__  endl;

   bfb bf0;
   bf0.data = 0;

   cout  bf0.data=  hex  bf0.data  endl;
   cout  bf0.my.a=  bf0.my.a  endl;
   cout  bf0.my.b=  bf0.my.b  endl;

   bf0.my.a = 1;

   cout  bf0.data=  hex  bf0.data  endl;
   cout  bf0.my.a=  bf0.my.a  endl;
   cout  bf0.my.b=  hex  bf0.my.b  endl;

   bf0.my.b = 1;

   cout  bf0.data=  hex  bf0.data  endl;
   cout  bf0.my.a=  bf0.my.a  endl;
   cout  bf0.my.b=  hex  bf0.my.b  endl;
}

int
main(int argc, char** argv)
{
   testa();
   testb();
   return 0;
}


--- Comment #1 from runipg at broadcom dot com  2010-09-02 23:39 ---
Fix:
As mentioned testb is a work-around for the coding style used in testa.


-- 
   Summary: Bug with anonymous unions and bit-fields
   Product: gcc
   Version: 4.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: runipg at broadcom dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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



[Bug other/45238] New: gccgo failure to build

2010-08-09 Thread gcc-bugzilla at gcc dot gnu dot org

libgo fails to build. Here's the error output:


gmake[4]: Entering directory
`/usr/home/chris/gnuobj/gccgo/i386-unknown-freebsd8.1/libgo'
rm -f syscall.gox syscalls/libsyscall.a
test -d syscalls || mkdir -p syscalls
files=`echo ../../../../gnusrc/gccgo/libgo/syscalls/errstr.go
../../../../gnusrc/gccgo/libgo/syscalls/exec_helpers.go
../../../../gnusrc/gccgo/libgo/syscalls/exec.go
../../../../gnusrc/gccgo/libgo/syscalls/socket.go
../../../../gnusrc/gccgo/libgo/syscalls/socket_linux.go
../../../../gnusrc/gccgo/libgo/syscalls/socket_epoll.go
../../../../gnusrc/gccgo/libgo/syscalls/syscall.go
../../../../gnusrc/gccgo/libgo/syscalls/syscall_unix.go
../../../../gnusrc/gccgo/libgo/syscalls/stringbyte.go
../../../../gnusrc/gccgo/libgo/syscalls/sysfile_posix.go
../../../../gnusrc/gccgo/libgo/syscalls/sysfile_linux.go sysinfo.go
../../../../gnusrc/gccgo/libgo/syscalls/errno.c sync.gox | sed -e 's/[^
]*\.gox//g' -e's/[^ ]*\.c//g'`; \
/bin/sh ./libtool --tag GO --mode=compile
/usr/home/chris/gnuobj/gccgo/./gcc/gccgo -B/usr/home/chris/gnuobj/gccgo/./gcc/ 
-minline-all-stringops -O2 -g -c -fgo-prefix=libgo__ -o syscalls/syscall.o
$files
libtool: compile:  /usr/home/chris/gnuobj/gccgo/./gcc/gccgo
-B/usr/home/chris/gnuobj/gccgo/./gcc/ -minline-all-stringops -O2 -g -c
-fgo-prefix=libgo__ ../../../../gnusrc/gccgo/libgo/syscalls/errstr.go
../../../../gnusrc/gccgo/libgo/syscalls/exec_helpers.go
../../../../gnusrc/gccgo/libgo/syscalls/exec.go
../../../../gnusrc/gccgo/libgo/syscalls/socket.go
../../../../gnusrc/gccgo/libgo/syscalls/socket_linux.go
../../../../gnusrc/gccgo/libgo/syscalls/socket_epoll.go
../../../../gnusrc/gccgo/libgo/syscalls/syscall.go
../../../../gnusrc/gccgo/libgo/syscalls/syscall_unix.go
../../../../gnusrc/gccgo/libgo/syscalls/stringbyte.go
../../../../gnusrc/gccgo/libgo/syscalls/sysfile_posix.go
../../../../gnusrc/gccgo/libgo/syscalls/sysfile_linux.go sysinfo.go  -fPIC -o
syscalls/.libs/syscall.o
sysinfo.go:2904:32: error: expected ')'
sysinfo.go:2904:32: error: expected ';' or newline after top level declaration
sysinfo.go:2904:32: error: expected declaration
sysinfo.go:2905:1: error: expected ';' or newline after top level declaration
sysinfo.go:3067:6: error: recursive type definition
sysinfo.go:3074:6: error: recursive type definition
sysinfo.go:3075:6: error: recursive type definition
sysinfo.go:3254:7: error: redefinition of '_FD_SETSIZE'
sysinfo.go:196:7: note: previous definition of '_FD_SETSIZE' was here
sysinfo.go:3255:7: error: redefinition of '_O_RDONLY'
sysinfo.go:308:7: note: previous definition of '_O_RDONLY' was here
sysinfo.go:3256:7: error: redefinition of '_O_WRONLY'
sysinfo.go:309:7: note: previous definition of '_O_WRONLY' was here
sysinfo.go:3257:7: error: redefinition of '_O_RDWR'
sysinfo.go:310:7: note: previous definition of '_O_RDWR' was here
sysinfo.go:3258:7: error: redefinition of '_O_ACCMODE'
sysinfo.go:311:7: note: previous definition of '_O_ACCMODE' was here
sysinfo.go:3259:7: error: redefinition of '_O_NONBLOCK'
sysinfo.go:314:7: note: previous definition of '_O_NONBLOCK' was here
sysinfo.go:3260:7: error: redefinition of '_O_APPEND'
sysinfo.go:315:7: note: previous definition of '_O_APPEND' was here
sysinfo.go:3261:7: error: redefinition of '_O_SHLOCK'
sysinfo.go:316:7: note: previous definition of '_O_SHLOCK' was here
sysinfo.go:3262:7: error: redefinition of '_O_EXLOCK'
sysinfo.go:317:7: note: previous definition of '_O_EXLOCK' was here
sysinfo.go:3263:7: error: redefinition of '_O_ASYNC'
sysinfo.go:318:7: note: previous definition of '_O_ASYNC' was here
sysinfo.go:3264:7: error: redefinition of '_O_FSYNC'
sysinfo.go:319:7: note: previous definition of '_O_FSYNC' was here
sysinfo.go:3265:7: error: redefinition of '_O_SYNC'
sysinfo.go:320:7: note: previous definition of '_O_SYNC' was here
sysinfo.go:3266:7: error: redefinition of '_O_NOFOLLOW'
sysinfo.go:321:7: note: previous definition of '_O_NOFOLLOW' was here
sysinfo.go:3267:7: error: redefinition of '_O_CREAT'
sysinfo.go:322:7: note: previous definition of '_O_CREAT' was here
sysinfo.go:3268:7: error: redefinition of '_O_TRUNC'
sysinfo.go:323:7: note: previous definition of '_O_TRUNC' was here
sysinfo.go:3269:7: error: redefinition of '_O_EXCL'
sysinfo.go:324:7: note: previous definition of '_O_EXCL' was here
sysinfo.go:3270:7: error: redefinition of '_O_NOCTTY'
sysinfo.go:325:7: note: previous definition of '_O_NOCTTY' was here
sysinfo.go:3271:7: error: redefinition of '_O_DIRECT'
sysinfo.go:326:7: note: previous definition of '_O_DIRECT' was here
sysinfo.go:3272:7: error: redefinition of '_O_DIRECTORY'
sysinfo.go:327:7: note: previous definition of '_O_DIRECTORY' was here
sysinfo.go:3273:7: error: redefinition of '_O_EXEC'
sysinfo.go:328:7: note: previous definition of '_O_EXEC' was here
sysinfo.go:3274:7: error: redefinition of '_O_TTY_INIT'
sysinfo.go:329:7: note: previous definition of '_O_TTY_INIT' was here
sysinfo.go:3275:7: error: redefinition of '_O_NDELAY'
sysinfo.go:335:7: note: previous definition 

[Bug bootstrap/45053] New: libgcc_s link command misses crtsavgpr_s and crtresgpr_s for powerpc

2010-07-24 Thread gcc-bugzilla at gcc dot gnu dot org

[I know this is a duplicate of 43810, but the information there is
partly misleading, so I decided to file a new report.]
If GCC is configured for powerpc with --enable-target-optspace,
libgcc_s objects get compiled with -Os, and this causes libgcc_s
to contain undefined symbols _savegpr_* and _restgpr_*.
This is probably due to this commit:
http://gcc.gnu.org/viewcvs?root=gccview=revrev=151729
(The use of those symbols might also depend on --with-float=soft,
I didn't test with a different float option.)
Those symbols _savegpr_* and _restgpr_* are defined in
crtsavgpr_s.o and crtresgpr_s.o, respectively.  But those objects
are not linked into libgcc_s.
The problem also occurs with gcc-4.5.1-RC-20100722 and with
gcc-4.4.4, if the patch for pr41175 is applied.

Environment:
System: Linux sonnet 2.6.24-28-generic #1 SMP Fri Jun 18 14:18:04 UTC 2010
x86_64 GNU/Linux


host: x86_64-unknown-linux-gnu
build: x86_64-unknown-linux-gnu
target: powerpc-none-linux-gnu
configured with: /work2/build/cross-own/src/gcc-4.5.0/configure
--target=powerpc-none-linux-gnu --prefix=/work2/build/cross-own/ppc-own-tmp
--disable-threads --disable-nls --disable-multilib --disable-libgomp
--disable-libssp --disable-libmudflap --enable-decimal-float=no
--disable-libssp --enable-shared --enable-languages=c --enable-checking=yes
--enable-symvers=gnu --enable-target-optspace --with-float=soft
--with-local-prefix=/work2/build/cross-own/ppc-own/sys-root
--with-build-sysroot=/work2/build/cross-own/ppc-own/sys-root
--with-sysroot=/work2/build/cross-own/ppc-own/sys-root

How-To-Repeat:
configure for powerpc and --enable-target-optspace (and possibly
--with-float=soft)


--- Comment #1 from dv at vollmann dot ch  2010-07-24 12:42 ---
Fix:
The workaround is not to use --enable-target-optspace.
The correct fix would be to link libgcc_s against crtsavgpr_s.o
and crtresgpr_s.o, but I don't know the build system of GCC well
enough to figure out how to do that.


-- 
   Summary: libgcc_s link command misses crtsavgpr_s and crtresgpr_s
for powerpc
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dv at vollmann dot ch
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: powerpc-none-linux-gnu


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



[Bug c++/44301] New: g++ ICE on complicated template code

2010-05-27 Thread gcc-bugzilla at gcc dot gnu dot org

g++ 4.5.0 produces an ICE (segmentation fault) on the code in the
How-To-Repeat section.  The error is (the first non-blank line of the
example is line 1):

test.ii: In instantiation of ‘eint’:
test.ii:19:8:   instantiated from here
test.ii:16:32: internal compiler error: Segmentation fault

The errors are very fragile, however.  Any of the following changes make
the code compile:

- Remove struct d, or the definition of x inside it.
- Remove the U template parameter to struct d.
- Replace the use of f in d with cT::type.
- Remove either of the uses of a (e.g., changing the second line of
  struct d to typename f::type x;
- Remove either of the indirections through b or c (e.g., change the
  body of c to typedef int type; and then replace the uses of
  cT::type with cT).
- Remove the declaration of x in struct e.
- Remove the instantiation of struct e at the end of the file.

Changing struct e to a function or wrapping the declaration of x in
struct d in a member function does not work around this problem.  The
code that this was trimmed down from works on earlier versions of g++
(the actual code is from
libs/graph_parallel/test/distributed_connected_components_test.cpp in
Boost trunk r62270), and this exact code compiles on 4.1.2.

Environment:
System: Linux flowerpot.osl.iu.edu 2.6.18-194.3.1.el5 #1 SMP Sun May 2 04:17:42
EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
Architecture: x86_64


host: x86_64-unknown-linux-gnu
build: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
configured with: ./configure --prefix=/u/jewillco/gcc45-install --enable-lto
--with-mpc=/u/jewillco/gcc45-install --with-mpfr=/u/jewillco/gcc45-install
--with-gmp=/u/jewillco/gcc45-install --with-ppl=/u/jewillco/gcc45-install
--with-cloog=/u/jewillco/gcc45-install --with-libelf=/u/jewillco/gcc45-install

How-To-Repeat:
Try to compile the following code (no flags required, but I tested with
-c; -fsyntax-only will also suffice to reproduce the problem):

template class T struct a {};

struct b {typedef int type;};

template typename T
struct c {typedef b type;};

template typename T, typename U
struct d {
  typedef typename cT::type f;
  atypename f::type x;
};

template typename T
struct e {
  atypename cT::type::type x;
};

eint y;


--- Comment #1 from jewillco at osl dot iu dot edu  2010-05-27 22:15 ---
Fix:
See description section for workarounds.


-- 
   Summary: g++ ICE on complicated template code
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jewillco at osl dot iu dot edu
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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



[Bug rtl-optimization/43892] New: PowerPC suboptimal add with carry optimization

2010-04-26 Thread gcc-bugzilla at gcc dot gnu dot org

PowerPC suboptimal add with carry optimization

Environment:
System: Linux gentoo-jocke 2.6.31-gentoo-r6 #1 SMP PREEMPT Sun Feb 28 22:54:53
CET 2010 i686 Intel(R) Core(TM)2 Duo CPU E8500 @ 3.16GHz GenuineIntel GNU/Linux



host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /var/tmp/portage/sys-devel/gcc-4.3.4/work/gcc-4.3.4/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.3.4
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.4
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.4/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.3.4/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/g++-v4
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--disable-fixed-point --enable-nls --without-included-gettext
--with-system-zlib --disable-checking --disable-werror --enable-secureplt
--disable-multilib --enable-libmudflap --disable-libssp --enable-libgomp
--disable-libgcj --with-arch=i686 --enable-languages=c,c++,treelang,fortran
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/
--with-pkgversion='Gentoo 4.3.4 p1.0, pie-10.1.5'

How-To-Repeat:
Noticed that gcc 4.3.4 doesn't optimize add with carry properly:

static u32
add32carry(u32 sum, u32 x)
{
  u32 z = sum + x;
  if (sum + x  x)
  z++;
  return z;
}
Becomes:
add32carry:
add 3,3,4
subfc 0,4,3
subfe 0,0,0
subfc 0,0,3
mr 3,0
Instead of:
addc 3,3,4
addze 3,3

This slows down the the Internet checksum sigificantly

Also, doing this in a loop can be further optimized:

for(;len; --len)
   sum = add32carry(sum, *++buf);


addic 3, 3, 0 /* clear carry */
.L31:
lwzu 0,4(9)
adde 3, 3, 0 /* add with carry */
bdnz .L31

addze 3, 3 /* add in final carry */


--- Comment #1 from joakim dot tjernlund at transmode dot se  2010-04-26 
13:33 ---
Fix:
None


-- 
   Summary: PowerPC suboptimal add with carry optimization
   Product: gcc
   Version: 4.3.4
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: joakim dot tjernlund at transmode dot se
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug target/43444] New: ICE in adjust_mems at var-tracking.c:789

2010-03-19 Thread gcc-bugzilla at gcc dot gnu dot org

ICE while building cross-compiler for ARM.

$ /usr/src/gcc-build/./gcc/xgcc -B/usr/src/gcc-build/./gcc/
-B/usr/src/armtest/arm-none-eabi/bin/ -B/usr/src/armtest/arm-none-eabi/lib/
-isystem /usr/src/armtest/arm-none-eabi/include -isystem
/usr/src/armtest/arm-none-eabi/sys-include-g -O2 -mfloat-abi=hard -O2  -g
-O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem
./include  -fno-inline -Wno-missing-prototypes -g  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc  -I. -I. -I../../.././gcc
-I../../../../gcc-4.5-20100318/libgcc -I../../../../gcc-4.5-20100318/libgcc/.
-I../../../../gcc-4.5-20100318/libgcc/../gcc
-I../../../../gcc-4.5-20100318/libgcc/../include   -o _muldi3.o -MT _muldi3.o
-MD -MP -MF _muldi3.dep -DL_muldi3 -c
../../../../gcc-4.5-20100318/libgcc/../gcc/libgcc2.c -save-temps
../../../../gcc-4.5-20100318/libgcc/../gcc/libgcc2.c: In function
‘__muldi3’:
../../../../gcc-4.5-20100318/libgcc/../gcc/libgcc2.c:562:1: internal compiler
error: in adjust_mems, at var-tracking.c:789

Environment:
System: Linux rechot 2.6.33 #2 SMP PREEMPT Thu Mar 11 15:47:34 CET 2010 i686
Intel(R) Pentium(R) 4 CPU 3.00GHz GenuineIntel GNU/Linux

Gentoo on x86 SMP.

$ /lib/libc.so.6
GNU C Library stable release version 2.10.1, by Roland McGrath et al.
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.3.4.
Compiled on a Linux 2.6.32.2 system on 2010-01-30.
Available extensions:
C stubs add-on version 2.1.2
crypt add-on version 2.1 by Michael Glad and others
Gentoo patchset 6
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
Support for some architectures added on, not maintained in glibc core.
BIND-8.2.3-T5B

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: arm-none-eabi
configured with: ../gcc-4.5-20100318/configure --prefix /usr/src/armtest
--target=arm-none-eabi

How-To-Repeat:
build gcc-4.5-20100318 snapshot for arm-none-eabi target


-- 
   Summary: ICE in adjust_mems at var-tracking.c:789
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mirq-gccboogs at rere dot qmqm dot pl
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-none-eabi


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



[Bug middle-end/42863] New: [4.5] Regression whith auto increments

2010-01-25 Thread gcc-bugzilla at gcc dot gnu dot org

This is a general m68k code generation regression. Starting with revision
150588 GCC for m68k generates surprising code for auto increments, eg.
for a strlcpy implementation. Compiling this code with the 4.5.0 snapshot
from 20100107 yields:

-- 4.5.0 --
_strlcpy:
movel d3,s...@-
movel d2,s...@-
movel sp@(16),d0
movel sp@(20),d1
jeq L7
movel d0,a0
movel sp@(12),a1
L3:
movel a0,d2
subql #1,d1
jeq L11
moveb a...@+,d2
moveb d2,a...@+
movel a0,d3 | --
tstb d2 | --
jne L3
L4:
subl d3,d0
notl d0
movel s...@+,d2
movel s...@+,d3
rts
L7:
movel d0,d2
movel d2,a0
L6:
moveb a...@+,d1
movel a0,d3 | --
tstb d1 | --
jeq L4
moveb a...@+,d1
movel a0,d3 | --
tstb d1 | --
jne L6
jra L4
L11:
clrb a1@
movel d2,a0
jra L6
-- cut --

Suddenly GCC inserts useless moves and because of these moves has also
to generate explicit tst instructions. Older GCC versions generated better
code by using tst.b incrementing an address register without extra move
instructions, i.e. 4.4.0:

-- 4.4.0 (release) --
_strlcpy:
movel d2,s...@-
movel sp@(8),a1
movel sp@(12),d0
movel sp@(16),d1
jne L2
movel d0,a0
L8:
tstb a...@+
jne L8
L5:
subl a0,d0
notl d0
movel s...@+,d2
rts
L2:
movel d0,a0
subql #1,d1
jeq L11
L6:
moveb a...@+,d2
moveb d2,a1@
jeq L5
addql #1,a1
subql #1,d1
jne L6
L11:
clrb a1@
tstb a...@+
jne L8
jra L5
-- cut --

Environment:
System: FreeBSD 6.3-STABLE #0: Sat Mar 1 11:12:32 CET 2008
r...@sirius:/usr/obj/usr/src/sys/SIRIUS i386

host: i386-unknown-freebsd6.3
build: i386-unknown-freebsd6.3
target: m68k-unknown-amigaos
configured with: ../gcc-4.5-gg/configure --disable-nls --disable-libssp
--enable-languages=c --with-gmp=/usr/local --disable-tls --target=m68k-amigaos

How-To-Repeat:
Compiling the following code with

  gcc-4.5.0 -O2 -fomit-frame-pointer strlcpy.c -o -

demonstrates the problem. FWIW, m68k-elf exhibits the very same problem!

-- cut --
typedef unsigned long size_t;
size_t
strlcpy(char *dst, const char *src, size_t n)
{ const char *s = src;
  if (n) {
while (--n)
  if ((*dst++ = *s++) == '\0')
goto out;
*dst = '\0';
  }
  while (*s++ != '\0')
continue;
out:
   return ~(src - s);
}
-- cut --


--- Comment #1 from gnikl at users dot sourceforge dot net  2010-01-25 
19:34 ---
Fix:
Reverting rev 150588 restores the previous behaviour.


-- 
   Summary: [4.5] Regression whith auto increments
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gnikl at users dot sourceforge dot net
 GCC build triplet: i386-unknown-freebsd6.3
  GCC host triplet: i386-unknown-freebsd6.3
GCC target triplet: m68k-unknown-amigaos


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



[Bug target/41551] New: ia64: ICE: in instantiate_virtual_regs_in_insn, at function.c:1630

2009-10-02 Thread gcc-bugzilla at gcc dot gnu dot org

ICE on ia64 at -O1 and higher, seen with gcc 4.3 and 4.4 but not 4.2.
% gcc -O -c t.c
t.c: In function 'main':
t.c:5:1: error: unrecognizable insn:
(insn 5 4 6 3 t.c:3 (set (reg:DF 344)
(unsigned_float:DF (reg/f:DI 328 sfp))) -1 (nil))
t.c:5:1: internal compiler error: in instantiate_virtual_regs_in_insn, at
function.c:1630

Environment:
System: Linux merulo 2.6.30.4-dsa-mckinley #1 SMP Sat Aug 15 18:22:08 UTC 2009
ia64 GNU/Linux
host: ia64-unknown-linux-gnu
build: ia64-unknown-linux-gnu
target: ia64-unknown-linux-gnu
configured with: ../src/configure -v --with-pkgversion='Debian 20090821-1'
--with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs
--enable-languages=c,ada,c++,java,fortran,objc,obj-c++
--prefix=/usr/lib/gcc-snapshot --enable-shared --enable-multiarch
--enable-linker-build-id --with-system-zlib --disable-nls --enable-clocale=gnu
--enable-libstdcxx-debug --disable-libssp --enable-mpfr --enable-java-awt=gtk
--enable-gtk-cairo --disable-plugin
--with-java-home=/usr/lib/gcc-snapshot/java-1.5.0-gcj-4.5/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/gcc-snapshot/java-1.5.0-gcj-4.5
--with-arch-directory=ia64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --with-system-libunwind --disable-werror
--build=ia64-linux-gnu --host=ia64-linux-gnu --target=ia64-linux-gnu

How-To-Repeat:
% cat t.c
int main(void)
{
 int var, *p = var;
 return (double)(unsigned long)(p);
}


--- Comment #1 from ntyni at debian dot org  2009-10-02 19:22 ---
Fix:
downgrade to -O0


-- 
   Summary: ia64: ICE: in instantiate_virtual_regs_in_insn, at
function.c:1630
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ntyni at debian dot org
 GCC build triplet: ia64-unknown-linux-gnu
  GCC host triplet: ia64-unknown-linux-gnu
GCC target triplet: ia64-unknown-linux-gnu


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



[Bug target/41021] New: [ARM] Suboptimal code generated to store a struct

2009-08-09 Thread gcc-bugzilla at gcc dot gnu dot org


A simple function to store a small struct ends up writing the struct to
memory twice unnecessarily (plus writing it for real the third time).

The function's args are passed in r0-r3 (with r1-r3 being the struct).
It compiles to a sequence containing the following loads and stores,
among others:

 [1] stmfd   sp!, {r0, r1, r2, r4, r5}
 [2] stmia   r0, {r1, r2, r3}
 [3] ldmia   r0, {r0, r1, r2}
 [4] stmia   r3, {r0, r1, r2}
 [5] ldmfd   sp!, {r1, r2, r3, r4, r5}

[2] and [3] seem the most egregious. (r0 points to stack space.)
However, [1] and [5] are odd too; I don't know why it's taking the time
to preserve r1-r3. Line [4] is the line that's actually necessary.

Adjusting the optimization level can eliminate the extra saves in [1],[5],
but all optimization levels seem to perform the extra save in [2],[3].

Environment:
System: OpenBSD underhill..org 4.4 UNDERHILL#1 i386



host: i386-unknown-openbsd4.4
build: i386-unknown-openbsd4.4
target: arm-none-elf
configured with: ../gcc-4.4.1/configure --with-system-zlib --disable-nls
--target=arm-none-elf --prefix=/usr/local/cross/arm-elf --enable-languages=c
--with-cpu=arm7tdmi --with-newlib --with-gmp=/usr/local --with-mpfr=/usr/local
--with-gnu-as --with-gnu-ld --disable-libssp
--enable-version-specific-runtime-libs

How-To-Repeat:

$ arm-none-elf-gcc -mcpu=arm7tdmi -mthumb-interwork  -Os  -Wa,-alhd  -c 
rstore.c

struct queue {
unsigned short used;
struct queue_entry {
unsigned short aux;
void (*func)(int);
int arg;
} entries[16];
};

void enqueue(struct queue *q, struct queue_entry ent)
{
q-entries[q-used++] = ent;
}


-- 
   Summary: [ARM] Suboptimal code generated to store a struct
   Product: gcc
   Version: 4.4.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: wiml at  dot org
 GCC build triplet: i386-unknown-openbsd4.4
  GCC host triplet: i386-unknown-openbsd4.4
GCC target triplet: arm-none-elf


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



[Bug other/40736] New: Fix for err_bad_typedef.c libffi test failure

2009-07-13 Thread gcc-bugzilla at gcc dot gnu dot org

 err_bad_typedef.c leads to a call to initialize_aggregate with
 arg-elemnts==NULL. This sets ptr on line 46 of
 libffi/src/prep_cif.c to NULL, which is then dereferenced on
 line 48.

Environment:
System: Linux dps 2.6.30.1-nofb #3 SMP PREEMPT Tue Jul 7 13:26:53 BST 2009
x86_64 GNU/Linux
Architecture: x86_64

host: x86_64-unknown-linux-gnu
build: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
configured with: ../gcc/trunk/configure -C --prefix=/usr --enable-hshared
--enab
le-languages=c,c++,fortran,java,objc --no-create --no-recursion

How-To-Repeat:
 Run the err_bad_typedef.c test case in the libffi test
 suite. It is an expected failure.


--- Comment #1 from dps at simpson dot demon dot co dot uk  2009-07-13 
20:36 ---
Fix:
The following patch turns err_bad_typedef.c test case into an
unexpected pass and the pacthed version passes all the tests the
current version does. I= am assuming that ptr==NULL is not meant
to happen so failure is the appropriate response.

--- libffi/src/prep_cif.c.dist  2009-06-04 22:31:11.003714944 +0100
+++ libffi/src/prep_cif.c   2009-07-13 02:00:43.956506574 +0100
@@ -44,6 +44,8 @@
FFI_ASSERT(arg-alignment == 0);

ptr = (arg-elements[0]);
+  if (ptr == NULL)
+  return FFI_BAD_TYPEDEF;

while ((*ptr) != NULL)
  {


-- 
   Summary: Fix for err_bad_typedef.c libffi test failure
   Product: gcc
   Version: 4.3.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dps at simpson dot demon dot co dot uk
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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



[Bug c++/40512] New: Compilation stops on valid code with ICE

2009-06-21 Thread gcc-bugzilla at gcc dot gnu dot org

compile the attached code with the -std=c++0x flag.

Environment:
System: Linux x 2.6.26-2-686 #1 SMP Thu Mar 26 01:08:11 UTC 2009 i686 GNU/Linux



host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure --prefix=/home/x/gcc-4.4-20090616
--enable-languages=,c,c++,

How-To-Repeat:
template unsigned width, unsigned height, typename T
class M {
T v;
public:
T  operator[](unsigned) { return v; } 
T const  operator[](unsigned) const { return v; }

template typename oT, unsigned owidth
auto mg(Mowidth, width, oT o)
- Mowidth, height, decltype(T()*o[0])
{
typedef Mowidth, height, decltype(T()*oT()) res_t;
return res_t();
}
template typename oT, unsigned owidth
auto operator*(Mowidth, width, oT const  o) const
- Mowidth, height, decltype(T()*oT())
{
typedef Mowidth, height, decltype(T()*oT()) res_t;
return res_t();
}
};

int main(int, char *[])
{
typedef M2, 2, int xt;
M3, 2, xt hv;
M4, 3, xt vv;
hv.mg(vv);
}


--- Comment #1 from pooly at ural2 dot hszk dot bme dot hu  2009-06-21 
21:32 ---
Fix:
Replace o[0] with oT() on line 10.


-- 
   Summary: Compilation stops on valid code with ICE
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pooly at ural2 dot hszk dot bme dot hu
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug c/40204] New: segfault with bitfields in structs

2009-05-19 Thread gcc-bugzilla at gcc dot gnu dot org

Compiling the following (nonsense but valid) code triggers an internal
compiler error.

Environment:
System: Linux thanatos 2.6.26-2-686-bigmem #1 SMP Thu Mar 26 02:03:34 UTC 2009 
i686 GNU/Linux

How-To-Repeat:
Compile the following:

-- snip --
struct s {
unsigned int a : 4;
unsigned int b : 28;
};

void f()
{
char c;
struct s s;
s.a = (c  4)  ~(14);
}
-- snip --

$ gcc -Wall -c bug.c 
gcc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See file:///usr/share/doc/gcc-4.3/README.Bugs for instructions.


--- Comment #1 from michael at walle dot cc  2009-05-19 22:16 ---
Fix:
not known


-- 
   Summary: segfault with bitfields in structs
   Product: gcc
   Version: 3.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michael at walle dot cc


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



[Bug libobjc/39465] New: libobjc does not find classes of DLLs

2009-03-15 Thread gcc-bugzilla at gcc dot gnu dot org

When building a program that uses an objc library as a DLL, libobjc
can't find its classes. When the program and the library are statically
linked, it works.
My libobjc itself is linked as a static library.

Environment:
System: Linux asgard.webkeks.org 2.6.28.5 #1 SMP Sat Feb 14 14:16:10 CET 2009
i686 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz GenuineIntel GNU/Linux



host: mingw32
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-4.3.0-20080502/configure -v --prefix=/usr
--libexecdir=/usr/lib --program-prefix=mingw32- --target=mingw32
--with-headers=/usr/mingw32/include --without-x --disable-nls
--disable-win32-registry --disable-shared --disable-java-awt
--disable-libgcj-debug --with-gcc --with-gnu-ld --with-gnu-as --enable-threads
--enable-languages=c,c++,objc --enable-libgcj --enable-java-gc=boehm
--enable-interpreter --enable-hash-synchronization --enable-libstdcxx-debug

How-To-Repeat:
asgard:/tmp$ cat foo.h
#import objc/Object.h

@interface MyObj: Object
- (void)foo;
@end
asgard:/tmp$ cat foo.m
#import stdio.h

#import foo.h

@implementation MyObj
- (void)foo
{
puts(foo!);
}
@end
asgard:/tmp$ cat test.m
#import foo.h

int main()
{
MyObj *x = [MyObj new];
[x foo];
return 0;
}
asgard:/tmp$ mingw32-gcc -shared -Wl,--out-implib,libfoo.dll.a foo.m -o
libfoo.dll -lobjc
asgard:/tmp$ mingw32-gcc -L. test.m -lfoo -lobjc
Info: resolving ___objc_class_name_MyObj by linking to
__impobjc_class_name_MyObj (auto-import)
/usr/lib/gcc/mingw32/4.3.0/../../../../mingw32/bin/ld: warning:
auto-importing has been activated without --enable-auto-import specified on the
command line.
This should work unless it involves constant data structures
referencing symbols from auto-imported DLLs.
asgard:/tmp$ wine a.exe
objc runtime: cannot find class MyObj


--- Comment #1 from js-gcc at webkeks dot org  2009-03-15 15:34 ---
Fix:
I guess some change to libobjc is needed so it can find classes inside
DLLs.


-- 
   Summary: libobjc does not find classes of DLLs
   Product: gcc
   Version: 3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libobjc
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: js-gcc at webkeks dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: mingw32
GCC target triplet: i686-pc-linux-gnu


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



[Bug c/38687] New: wrong-code in loop optimization

2009-01-01 Thread gcc-bugzilla at gcc dot gnu dot org

Example program works with option -O1, but not with -O2
Problem occurs with gcc 4.3.2 and 4.4.0, but not with 4.2.4

Environment:
System: Linux andiunx 2.6.27-11-generic #1 SMP Fri Dec 19 16:29:52 UTC 2008
i686 GNU/Linux

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure

How-To-Repeat:
Compile the following program with
gcc -O2 foobar.c

extern int printf (__const char *__restrict __format, ...);

int
main ()
{
  int j;

  for (j = 1; j  0; j += j)
printf(%d\n,j);
  return 0;
}


--- Comment #1 from andikies at t-online dot de  2009-01-01 15:36 ---
Fix:
Do not use -O2 option.


-- 
   Summary: wrong-code in loop optimization
   Product: gcc
   Version: 4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: andikies at t-online dot de
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug tree-optimization/38405] New: Regression (silent failure) handling bitfield in ternary

2008-12-04 Thread gcc-bugzilla at gcc dot gnu dot org

In the context of a function returning int, and rfp-signed is a
one-bit field,
return rfp-signed_flag ? 1 : 0;
yields -1.  This is an optimization problem, seen with -O2 but not -O1.
Isolated to -ftree-vrp.  Not seen in gcc-4.3 or earlier.

Environment:
System: Linux recycle 2.6.26-1-amd64 #1 SMP Sat Oct 18 15:27:18 UTC 2008 x86_64
GNU/Linux



host: x86_64-pc-linux-gnu
build: x86_64-pc-linux-gnu
target: x86_64-pc-linux-gnu
configured with: ../src/configure -v --with-pkgversion='Debian 20081130-1'
--with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs
--enable-languages=c,c++,java,fortran,objc,obj-c++,ada
--prefix=/usr/lib/gcc-snapshot --enable-shared --with-system-zlib --disable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk
--enable-gtk-cairo --disable-plugin
--with-java-home=/usr/lib/gcc-snapshot/java-1.5.0-gcj-4.4-1.5.0.0/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/gcc-snapshot/jvm
--with-jvm-jar-dir=/usr/lib/gcc-snapshot/jvm-exports
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-mpfr
--enable-cld --disable-werror --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu

How-To-Repeat:

Short way:

$ gcc -Wall -O1 -ftree-vrp ternbug.c -o ternbug  ./ternbug
Hello world: -1
FAIL
$ 

Long way:

$ /usr/lib/gcc-snapshot/libexec/gcc/x86_64-linux-gnu/4.4.0/cc1 -fpreprocessed
ternbug.i -quiet -dumpbase ternbug.c -mtune=generic -auxbase ternbug -O1
-ftree-vrp -version -o ternbug.s
GNU C (Debian 20081130-1) version 4.4.0 20081130 (experimental) [trunk revision
142292] (x86_64-linux-gnu)
compiled by GNU C version 4.4.0 20081130 (experimental) [trunk revision
142292], GMP version 4.2.2, MPFR version 2.3.2.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: ef8facef55b835d47393957737fa78a4
$ as -V -Qy -o ternbug.o ternbug.s
GNU assembler version 2.18.0 (x86_64-linux-gnu) using BFD version (GNU Binutils
for Debian) 2.18.0.20080103
$ /usr/lib/gcc-snapshot/libexec/gcc/x86_64-linux-gnu/4.4.0/collect2
--eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o
ternbug /usr/lib/../lib/crt1.o /usr/lib/../lib/crti.o
/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.4.0/crtbegin.o
-L/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.4.0
-L/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.4.0/../../../../lib
-L/lib/../lib -L/usr/lib/../lib
-L/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.4.0/../../.. ternbug.o -lgcc
--as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed
/usr/lib/gcc-snapshot/lib/gcc/x86_64-linux-gnu/4.4.0/crtend.o
/usr/lib/../lib/crtn.o
$ ./ternbug
Hello world: -1
FAIL
$ 

Minimal test case, ternbug.{c,i}:

extern int printf (__const char *__restrict __format, ...);

struct vpiBinaryConst {
 int signed_flag :1;
 int sized_flag :1;
};

int binary_get(int code, struct vpiBinaryConst *rfp)
{
 switch (code) {
  case 1:
   return rfp-signed_flag ? 1 : 0;
  default:
   printf(error: %d not supported\n, code);
   return 0;
 }
}


--- Comment #1 from ldoolitt at recycle dot lbl dot gov  2008-12-04 17:36 
---
Fix:
Work around by reducing optimization, e.g., from -O2 to -O1


-- 
   Summary: Regression (silent failure) handling bitfield in ternary
   Product: gcc
   Version: 4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ldoolitt at recycle dot lbl dot gov
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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



[Bug java/38075] New: Scanner(System.in) causes next*() to behave incorrectly

2008-11-10 Thread gcc-bugzilla at gcc dot gnu dot org


When the below code (see How-To-Repeat) is compiled and run, the
program waits for input after initializing the Scanner. That input is
then returned to the first input.next() call, and each input.next()
call returns the user input given during the previous call.

Environment:
System: Linux hybrid 2.6.27-zen3-4.2.0 #2 SMP Sat Oct 25 12:29:11 EDT
2008 x86_64 GNU/Linux 
host: x86_64-unknown-linux-gnu
build: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
configured with: ../trunk/configure --program-suffix=-svn 
--enable-languages=c,c++,java --with-x --enable-java-awt=xlib

How-To-Repeat:
Compile and run a file containing the following code:

import java.util.Scanner;

public class Test {
public static void main(String argv[]) {
Scanner input = new Scanner(System.in);

System.out.print(Enter a string: );
String foo = input.next();
System.out.println(foo);

System.out.print(Enter a string: );
foo = input.next();
System.out.println(foo);

input.close();
}
}


-- 
   Summary: Scanner(System.in) causes next*() to behave incorrectly
   Product: gcc
   Version: 4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jre21 at case dot edu
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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



[Bug pending/37879] New: g++: internal compiler error: Segmentation fault

2008-10-21 Thread gcc-bugzilla at gcc dot gnu dot org
NOTE: Defaulting component because reported component no longer exists
ICE: Segmentation fault when compiling with an incorrect used
__attribute__((noreturn));

Environment:
System: Linux molybdaen 2.6.26-1-686 #1 SMP Wed Sep 10 16:46:13 UTC 2008 i686
GN
U/Linux

host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.1-9'
--with-b
ugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran
,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib
--libexecdir=/usr
/lib --without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-i
nclude-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu
--ena
ble-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all
--enable
-cld --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--ta
rget=i486-linux-gnu
Thread model: posix
gcc version 4.3.1 (Debian 4.3.1-9)

How-To-Repeat:
source code (preprocessed file looks the same):

inline unsigned f( unsigned i ) { return i; }
unsigned i = 23;
static inline void g( unsigned ) __attribute__((noreturn));
static inline void g( unsigned j ) { if( j ) asm (hlt); }
void main_func() asm(main_func) __attribute__((noreturn));
void main_func()
{
unsigned j;
g( f( j = i++ ) );
asm(hlt);
}

compile with:
g++ -save-temps -m32 -MD -Os -ffunction-sections -fstrict-aliasing
-fno-rtti
 -fno-exceptions -fcheck-new -fshort-enums --param max-inline-insns-single=100
-
mregparm=3 -fomit-frame-pointer -minline-all-stringops -nostdinc -ggdb 
-Wconver
sion -Wctor-dtor-privacy -Wdeprecated -Winvalid-offsetof -Wnon-template-friend
-
Wold-style-cast -Woverloaded-virtual -Wpmf-conversions -Wreorder -Wsign-promo
-W
strict-null-sentinel -Wsynth -Waggregate-return -Wattributes -Wcast-align
-Wdepr
ecated-declarations -Wextra -Winline -Wmissing-noreturn -Wpacked -Wshadow
-Wstac
k-protector -Wstrict-aliasing -Wswitch -Wswitch-default -Wswitch-enum
-Wsystem-h
eaders -Wunsafe-loop-optimizations -Wvolatile-register-var
-Wdisabled-optimizati
on -Wformat -Wreturn-type -Wno-non-virtual-dtor -Wuninitialized -c -o
segfault.o
 segfault.cc


--- Comment #1 from benjamin at os dot inf dot tu-dresden dot de  
2008-10-21 07:09 ---
Fix:
use __attribute__((noreturn)) correctly


-- 
   Summary: g++: internal compiler error: Segmentation fault
   Product: gcc
   Version: 3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: pending
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: benjamin at os dot inf dot tu-dresden dot de
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


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



[Bug preprocessor/37215] New: ICE on 'gcc -E -dM -fpreprocessed - /dev/null'

2008-08-23 Thread gcc-bugzilla at gcc dot gnu dot org

Executing 'gcc -E -dM -fpreprocessed -  /dev/null' gives:

stdin:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.

Environment:
System: Linux alpha2 2.6.26 #1 Sun Jul 20 12:35:52 CEST 2008 x86_64 AMD
Athlon(tm) 64 Processor 2800+ AuthenticAMD GNU/Linux
Architecture: x86_64


host: x86_64-unknown-linux-gnu
build: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
configured with: ../configure --prefix=/usr --enable-shared
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --enable-threads=posix
--mandir=/usr/share/man --enable-__cxa_atexit --disable-multilib
--libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu
--disable-libstdcxx-pch --with-tune=generic

How-To-Repeat:
Just run 'gcc -E -dM -fpreprocessed -  /dev/null'.


-- 
   Summary: ICE on 'gcc -E -dM -fpreprocessed -  /dev/null'
   Product: gcc
   Version: 3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ivan dot stankovic at fer dot hr
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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



[Bug c++/37087] New: Segfault on compiling template defined in wrong namespace.

2008-08-11 Thread gcc-bugzilla at gcc dot gnu dot org

G++ reports a segmentation fault when compiling the code below.

Environment:
System: Linux temporal.corp.google.com 2.6.18.5-gg34workstation-mixed64-32 #1
SMP Thu May 8 01:31:23 UTC 2008 x86_64 GNU/Linux
Architecture: x86_64

host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-linux-gnu
configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr
--disable-werror --with-tune=pentium4 --enable-checking=release i486-linux-gnu

How-To-Repeat:
Invoke g++ on the following (invalid) code with no other arguments.
There are no #includes; this is the entire source file.

==
namespace a {
  template typename T class Foo;
}

namespace b {
  template  class ::a::Foodouble {};
}
==

(The gccbug script claims it will remove comments delimited by angle
brackets.
Hopefully that isn't actually true because it will mess up the above code
sample as well as the following error log.)

Result:
testtemplate.cc:6: error: global qualification of class name is invalid before
'{' token
testtemplate.cc:6: error: specialization of 'templateclass T struct a::Foo'
in different namespace
testtemplate.cc:2: error:   from definition of 'templateclass T struct
a::Foo'
g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See URL:http://gcc.gnu.org/bugs.html for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
URL:file:///usr/share/doc/gcc-4.0/README.Bugs.


--- Comment #1 from kenton at google dot com  2008-08-11 22:23 ---
Fix:
Unknown.


-- 
   Summary: Segfault on compiling template defined in wrong
namespace.
   Product: gcc
   Version: 4.0.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kenton at google dot com
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


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



[Bug c/36951] New: uninitialized-variable warning misnames program objects after inlining

2008-07-27 Thread gcc-bugzilla at gcc dot gnu dot org


Compiling the attached piece of code produces this:

  foo.c: In function 'bar':
  foo.c:8: warning: 'bar_thing.member' is used uninitialized in this function

but line 8 is in foo(), not bar, and bar_thing isn't in scope.

It has inlined foo (confirmed in the assembler output) and it's
reporting about the inlined assignment, but it's doing so in a... less
than desirable way.

When I hit this on real source, the inlined function and the call site
were 1000 lines apart, and the reported name of the variable at the
call site (equivalent to bar_thing) was not illuminating, so I had
to get most of the way through preparing the minimal bug report before
I realized what was going on.

I've seen this on several configurations of gcc 4.1.2 (and also the
pre-4.1.3 snap NetBSD is currently using) but I don't have any newer
gccs than that on hand.

If you don't care because nobody cares about 4.1 any more and it
doesn't repeat on newer gccs, oh well.

Environment:
System: NetBSD tanaqui 4.99.54 NetBSD 4.99.54 (TANAQUI) #21: Fri Feb 29
12:31:31 EST 2008 [EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/TANAQUI i386
host: i386-unknown-netbsdelf4.99.19
build: i386-unknown-netbsdelf4.99.19
target: mips-unknown-linux-gnu
configured with:
/home/dholland/projects/os161/toolchain/work2007/test-gcc/./gcc-4.1.2+cs161/configure
--target=mips-linux --nfp --disable-shared --disable-threads
--disable-libmudflap --disable-libssp --prefix=/home/dholland/cs161/tools

How-To-Repeat:

gcc -Wall -O -c foo.i

foo.i:
   
# 1 foo.c
# 1 built-in
# 1 command line
# 1 foo.c
struct thing {
   int member;
};

struct thing *external;

static void foo(struct thing foo_thing) {
   *external = foo_thing;
}

void bar(void) {
   struct thing bar_thing;
   foo(bar_thing);
}
   


-- 
   Summary: uninitialized-variable warning misnames program objects
after inlining
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dholland at eecs dot harvard dot edu
 GCC build triplet: i386-unknown-netbsdelf4.99.19
  GCC host triplet: i386-unknown-netbsdelf4.99.19
GCC target triplet: mips-unknown-linux-gnu


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



[Bug c++/36855] New: __has_trivial_destructor() returns false for reference types.

2008-07-16 Thread gcc-bugzilla at gcc dot gnu dot org

__has_trivial_destructor() returns false for all reference types, but
should return true according to documentation. The documented behavior
is consistent with what is required by the c++0x draft.

Environment:
System: Linux cranium 2.6.18-8.el5xen #1 SMP Fri Jan 26 14:29:35 EST 2007
x86_64 x86_64 x86_64 GNU/Linux
Architecture: x86_64


host: x86_64-unknown-linux-gnu
build: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
configured with: /build/sebor/src/gcc-4.3.0/configure
--prefix=/nfs/devco/contrib/linux/gcc-4.3.0
--with-gmp=/nfs/devco/contrib/linux/gmp-4.2
--with-mpfr=/nfs/devco/contrib/linux/mpfr-2.3.1

How-To-Repeat:
Attempt to compile the following code as g++ -std=gnu++0x t.cpp

typedef char assert_0 [__has_trivial_destructor (int) ? 1 : -1];


--- Comment #1 from vitek at roguewave dot com  2008-07-16 18:45 ---
Fix:
A workaround would be to use a wrapper template that has a special case
for reference types.


-- 
   Summary: __has_trivial_destructor() returns false for reference
types.
   Product: gcc
   Version: 3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vitek at roguewave dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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



[Bug c++/36856] New: __is_pod() fails for some pod types

2008-07-16 Thread gcc-bugzilla at gcc dot gnu dot org

The __is_pod() built-in returns false for pod class types that have base
classes, which is allowed by c++0x.

Environment:
System: Linux cranium 2.6.18-8.el5xen #1 SMP Fri Jan 26 14:29:35 EST 2007
x86_64 x86_64 x86_64 GNU/Linux
Architecture: x86_64


host: x86_64-unknown-linux-gnu
build: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
configured with: /build/sebor/src/gcc-4.3.0/configure
--prefix=/nfs/devco/contrib/linux/gcc-4.3.0
--with-gmp=/nfs/devco/contrib/linux/gmp-4.2
--with-mpfr=/nfs/devco/contrib/linux/mpfr-2.3.1

How-To-Repeat:
Compile the following code as g++ -std=gnu++0x t.cpp

struct pod_t { };
struct derived_pod_t : pod_t { };

typedef char assert [__is_pod (derived_pod_t) ? 1 : -1];


--- Comment #1 from vitek at roguewave dot com  2008-07-16 18:54 ---
Fix:
No known workaround.


-- 
   Summary: __is_pod() fails for some pod types
   Product: gcc
   Version: 3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vitek at roguewave dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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



[Bug c++/35021] New: g++ fails to compile legal template code involving templatized methods

2008-01-29 Thread gcc-bugzilla at gcc dot gnu dot org

g++ is unable to compile a call to a templatized method from a template
function that takes the class that contains the templatized methods as
a template parameter.

Environment:
System: Linux bnell-deb4-64 2.6.18-4-amd64 #1 SMP Mon Mar 26 11:36:53 CEST 2007
x86_64 GNU/Linux
Architecture: x86_64


host: x86_64-unknown-linux-gnu
build: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
configured with: ../../../sources/gcc/configure
--prefix=/hub/Linux/glibc-2.3.6/x86_64/apps/gcc-4.1.1
--with-gmp=/mathworks/devel/sandbox/greg/Amake/3p/derived/glnxa64/gcc/gmp
--with-mpfr=/mathworks/devel/sandbox/greg/Amake/3p/derived/glnxa64/gcc/mpfr
--enable-languages=c,c++,fortran
--with-as=/hub/Linux/glibc-2.3.6/x86_64/apps/gcc-4.1.1/bin/as
--with-ld=/hub/Linux/glibc-2.3.6/x86_64/apps/gcc-4.1.1/bin/ld
--disable-multilib

How-To-Repeat:
1) save the following code into bug.cpp

  struct foo {
template int n
const void* bar(char* p) const
{
  return p;
}

template typename T
const void* moo(char* p) const
{
  return p;
}
  };

  template typename F
  void test_template(const F f)
  {
f.bar3(0);// doesn't work here
f.mooint(0);  // doesn't work here
  }

  int main(int argc, char* argv[])
  {
foo f;

f.bar3(0);// works here
f.mooint(0);  // works here

test_template(f);

return 0;
  }

2) attempt to compile: g++ -o bug bug.cpp


-- 
   Summary: g++ fails to compile legal template code involving
templatized methods
   Product: gcc
   Version: 4.1.1
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bnell at mathworks dot com
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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



[Bug c++/34977] New: GCC 3.4.6 link fails with undefined reference to .hidden symbol __floatdidf (libgcc.a)

2008-01-25 Thread gcc-bugzilla at gcc dot gnu dot org

Building Regina-REXX-3.4 from source distribution.  The linker fails
with the following error:

/usr/local/bin/gcc  -O2 -I/usr/local/include  -pthreads -L/usr/local/lib -o
execiser32 execiser.o -L. -lregina -lfl  -lm -lnsl -lsocket -lcrypt -ldl  
-lpthread
/usr/local/bin/ld: execiser32: hidden symbol `__floatdidf' in
/usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.6/libgcc.a(_floatdidf.oS) is
referenced by DSO
/usr/local/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status

I've verified that the compiled code has undefined references to the
__floatdidf function.

Environment:
System: SunOS arcade 5.9 Generic_122300-13 sun4u sparc SUNW,Sun-Fire-V490
Architecture: sun4


host: sparc-sun-solaris2.9
build: sparc-sun-solaris2.9
target: sparc-sun-solaris2.9
configured with: ../src/gcc-3.4.6/configure
--prefix=/sea/compilers/native/gcc-3.4.6 --with-local-prefix=/sea/local
--enable-threads --enable-languages=c,c++ --disable-multilib --with-gnu-as
--with-gnu-ld --with-as=/sea/compilers/native/gcc-3.4.6/bin/as
--with-ld=/sea/compilers/native/gcc-3.4.6/bin/ld

How-To-Repeat:
Untar REXX
configure --enable-32bit
make


--- Comment #1 from Reid dot Madsen at tek dot com  2008-01-26 01:10 ---
Fix:
I know of no workaround.


-- 
   Summary: GCC 3.4.6 link fails with undefined reference to .hidden
symbol __floatdidf (libgcc.a)
   Product: gcc
   Version: 3.4.6
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Reid dot Madsen at tek dot com
 GCC build triplet: sparc-sun-solaris2.9
  GCC host triplet: sparc-sun-solaris2.9
GCC target triplet: sparc-sun-solaris2.9


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



[Bug debug/34767] New: trouble debugging C++ programs: info locals = No locals.

2008-01-13 Thread gcc-bugzilla at gcc dot gnu dot org


Here is the minimal test case exhibiting my trouble:

   $ cat bug.cc
   #include iostream

   class c { public: c (); };

   c::c ()
   {
 int i = 42;
 std::cout  i  std::endl;
   }

   int
   main (int argc, char** argv)
   {
 c* C = new c;
   }

I compile it with the following command:

   $ g++ -g -O0 bug.cc

With g++ 3.* or 4.0.*, everything's fine:

   (gdb) start
   Breakpoint 1 at 0x4008d8: file /home/toomas/bug.cc, line 14.
   warning: no loadable sections found in added symbol-file system-supplied DSO
at 0x7fff193fd000
   main (argc=1, argv=0x7fff19283c78) at /home/toomas/bug.cc:14
   14c* C = new c;
   (gdb) s
   c (this=0x602010) at /home/toomas/bug.cc:7
   7 int i = 42;
   (gdb) s
   8 std::cout  i  std::endl;
   (gdb) p i
   $1 = 42
   (gdb) info locals
   i = 42

But with version 4.1.0 and above, I cannot inspect local symbols
in c::c():

   (gdb) start
   Breakpoint 1 at 0x4008d8: file /home/toomas/bug.cc, line 14.
   warning: no loadable sections found in added symbol-file system-supplied DSO
at 0x713fd000
   main (argc=1, argv=0x71261c58) at /home/toomas/bug.cc:14
   14c* C = new c;
   (gdb) s
   c (this=0x602010) at /home/toomas/bug.cc:7
   7 int i = 42;
   (gdb) s
   8 std::cout  i  std::endl;
   (gdb) p i
   No symbol i in current context.
   (gdb) info locals
   No locals.

At the same time, there is nothing wrong with the local symbols of
main().

Experimenting with sources co'd from SVN (trunk), I found out that
the last revision that behaves correctly is -r96653.  There was
one change in -r96654:

   2005-03-18  Jan Hubicka  [EMAIL PROTECTED]

  * cgraph.c (cgraph_remove_node): Avoid loop in code deciding whether
  function body should be released; do not proactively release function
  bodies in non-unit-at-a-time mode.

Here I turned out to have arrived at the seat of the end of my
wits.

Output of `objdump -lSd' was exactly the same in both cases, but
there were many differences in the `.debug_info' section.

This seems not to be a hardware- or distribution-specific issue,
because I have the same situation on two Debian systems and on a
hand-crafted system, with both AMD64 and Pentium 4 hardware.  (All
of them GNU/Linux.)

Thanks in advance,
Toomas.

Environment:
System: Linux toomas 2.6.23.1 #1 SMP Sun Nov 4 13:54:34 EET 2007 x86_64
GNU/Linux
host: x86_64-unknown-linux-gnu
build: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
configured with: /INCOMING/misc/gcc-96654/configure --disable-multilib
--disable-bootstrap --enable-languages=c,c++

How-To-Repeat:

cat  bug.cc  EOF
#include iostream

class c { public: c (); };

c::c ()
{
  int i = 42;
  std::cout  i  std::endl;
}

int
main (int argc, char** argv)
{
  c* C = new c;
}
EOF

g++ -g -O0 bug.cc

{ echo start; echo s; echo s; echo info locals; } | gdb --batch -x - ./a.out


-- 
   Summary: trouble debugging C++ programs: info locals = No
locals.
   Product: gcc
   Version: 4.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: toomas at rosin dot pri dot ee
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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



[Bug c/33519] New: Invalid code generated with a combination of thumb, AAPCS and -Os.

2007-09-21 Thread gcc-bugzilla at gcc dot gnu dot org

GCC generates odd code sequence..

Part of the source (full source in attachment):

usbd_status
usbd_do_request_flags_pipe(usbd_device_handle dev, usbd_pipe_handle pipe,
usb_device_request_t *req, void *data, u_int16_t flags, int *actlen,
u_int32_t timeout)
{
usbd_xfer_handle xfer;
usbd_status err;

xfer = usbd_alloc_xfer(dev);
...


objdump output:

 usbd_do_request_flags_pipe:
   0:   b5f0push{r4, r5, r6, r7, lr}
   2:   b089sub sp, #36
   4:   1c14addsr4, r2, #0
   6:   9a0fldr r2, [sp, #60]
   8:   1c1eaddsr6, r3, #0
   a:   605astr r2, [r3, #4]-- writes using r3 (data)
   c:   9b10ldr r3, [sp, #64]
   e:   9007str r0, [sp, #28]
  10:   609bstr r3, [r3, #8]
  12:   ab0eadd r3, sp, #56
  14:   9106str r1, [sp, #24]
  16:   881fldrhr7, [r3, #0]
  18:   f7ff fffe   bl  0 usbd_alloc_xfer


And here's objdump output when compiled with the same options but gcc 4.2.1:

 usbd_do_request_flags_pipe:
   0:   b5f0push{r4, r5, r6, r7, lr}
   2:   b089sub sp, #36
   4:   1c1eaddsr6, r3, #0
   6:   ab0eadd r3, sp, #56
   8:   9007str r0, [sp, #28]
   a:   9106str r1, [sp, #24]
   c:   1c14addsr4, r2, #0
   e:   881fldrhr7, [r3, #0]
  10:   f7ff fffe   bl  0 usbd_alloc_xfer

Environment:
System: Linux kivi 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686
GNU/Linux
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: arm-unknown-elf
configured with: /s/devel/gcc-4.1.1/configure --target=arm-elf --with-gnu-as
--with-gcc --with-gnu-ld --enable-languages=c --disable-libstdc
--disable-hosted-libstdcxx --disable-libstdcxx --disable-libstdcxx-v3
--disable-libstdcxx_v3 --disable-nls --disable-shared --disable-threads
--disable-libmudflap --disable-libssp --disable-libgomp --disable-libstdcxx-pch
--prefix=/emb/arm-elf-gcc-4.1.1 --program-prefix=arm-elf- --program-suffix=
--with-newlib -v --without-headers -v

How-To-Repeat:
Compile the test case like:
# arm-elf-gcc -Os -Wall -Werror -mcpu=arm920t -mlittle-endian -mthumb
-mabi=aapcs -c usbdi.c -o usbdi.o


--- Comment #1 from sami dot kantoluoto at embedtronics dot fi  2007-09-21 
16:29 ---
Fix:
Work arounds: gcc 4.2.1, optimize for speed instead of size.


-- 
   Summary: Invalid code generated with a combination of thumb,
AAPCS and -Os.
   Product: gcc
   Version: 4.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sami dot kantoluoto at embedtronics dot fi
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-unknown-elf


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



[Bug c++/33468] New: C++: Invalid interpretation of friendness with nested classes

2007-09-18 Thread gcc-bugzilla at gcc dot gnu dot org

Gcc's friend-mechanism seems to expand to nested classes as well, although
the C++ standard explicitly tells differently.

The following example is almost straight from the C++ standard (11.4/2). The
only change is that inheritance is commented out for class X (in order to
remove the first error in the example). Gcc compiles this with no error
messages, even with -Wall -pedantic

// test.cc
class A {
  class B { };
  friend class X;
};

// INHERITANCE BELOW COMMENTED OUT BY ME
class X /* : A::B */ { // ill-formed: A::B cannot be accessed
  // in the base-clause for X
  A::B mx; // OK: A::B used to declare member of X
  class Y : A::B { // OK: A::B used to declare member of X
// !!! The illegal line below compiles fine !!
A::B my; // ill-formed: A::B cannot be accessed
// to declare members of nested class of X
  };
};

Environment:
System: Linux mustikkakukko 2.6.18.8-0.3-default #1 SMP Tue Apr 17 08:42:35 UTC
2007 x86_64 x86_64 x86_64 GNU/Linux
Architecture: x86_64


host: x86_64-suse-linux-gnu
build: x86_64-suse-linux-gnu
target: x86_64-suse-linux-gnu
configured with: ../gcc-4.2.1/configure --prefix=/usr/local/gcc-4.2.1
--bindir=/usr/local/gcc-4.2.1/bin64 --enable-languages=c,c++
--enable-__cxa_atexit --host=x86_64-suse-linux --with-arch=nocona
--with-tune=nocona

How-To-Repeat:
  g++ -W -Wall -pedantic -c test.cc
  (No errors result in compilation.)


-- 
   Summary: C++: Invalid interpretation of friendness with nested
classes
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bitti at iki dot fi
 GCC build triplet: x86_64-suse-linux-gnu
  GCC host triplet: x86_64-suse-linux-gnu
GCC target triplet: x86_64-suse-linux-gnu


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



[Bug bootstrap/33306] New: [4.3 regression] Bootstrap failure on Tru64 UNIX V5.1B: ICE in convert_move, at expr.c:369

2007-09-04 Thread gcc-bugzilla at gcc dot gnu dot org

Bootstrapping current mainline as of 20070903 fails on alpha-dec-osf5.1b
building the stage 1 libgcc:

/vol/gccsrc/obj/gcc-4.3.0-20070903/5.1b-gcc/./gcc/xgcc
-B/vol/gccsrc/obj/gcc-4.3.0-20070903/5.1b-gcc/./gcc/
-B/vol/gcc/alpha-dec-osf5.1b/bin/ -B/vol/gcc/alpha-dec-osf5.1b/lib/ -isystem
/vol/gcc/alpha-dec-osf5.1b/include -isystem
/vol/gcc/alpha-dec-osf5.1b/sys-include -g -fkeep-inline-functions -O2  -O2 -g
-O2   -mieee -DIN_GCC-W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include  -pthread -g
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I.
-I../.././gcc -I/vol/gcc/src/gcc-dist/libgcc -I/vol/gcc/src/gcc-dist/libgcc/.
-I/vol/gcc/src/gcc-dist/libgcc/../gcc -I/vol/gcc/src/gcc-dist/libgcc/../include
 -DHAVE_CC_TLS -o _powitf2.o -MT _powitf2.o -MD -MP -MF _powitf2.dep
-DL_powitf2 -c /vol/gcc/src/gcc-dist/libgcc/../gcc/libgcc2.c \

/vol/gcc/src/gcc-dist/libgcc/../gcc/libgcc2.c: In function '__powitf2':
/vol/gcc/src/gcc-dist/libgcc/../gcc/libgcc2.c:1742: internal compiler error: in
convert_move, at expr.c:369

The same problem happens at -O, while -O0 is ok.

Environment:
System: OSF1 bartok V5.1 2650 alpha
Machine: alpha

host: alpha-dec-osf5.1b
build: alpha-dec-osf5.1b
target: alpha-dec-osf5.1b
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf5.1b --build
alpha-dec-osf5.1b --target alpha-dec-osf5.1b --with-gmp=/vol/gcc
--with-mpfr=/vol/gcc --enable-languages=c,c++,fortran,java,objc,ada
--disable-libmudflap

How-To-Repeat:
Bootstrap mainline as described above.


-- 
   Summary: [4.3 regression] Bootstrap failure on Tru64 UNIX V5.1B:
ICE in convert_move, at expr.c:369
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf5.1b
  GCC host triplet: alpha-dec-osf5.1b
GCC target triplet: alpha-dec-osf5.1b


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



[Bug c/33024] New: gcc allows negatively-sized arrays

2007-08-08 Thread gcc-bugzilla at gcc dot gnu dot org

By using an integer variable as the size of an array to be 
initialized on the stack, you can trick gcc into accepting
and trying to create a negatively-sized array.  The assembly
it generates in such a case seems to indicate it really thinks
it has a negatively-sized array.

Environment:
System: Linux pc1 2.6.20-15-generic #2 SMP Sun Apr 15 07:36:31 UTC 2007 i686
GNU/Linux
Architecture: i686

host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-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
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release i486-linux-gnu

How-To-Repeat:
#include stdio.h

int main(int argc, char **argv) {
int x = -2;
int y[x];

printf(%d\n, sizeof(y));
}

This will output -8.


--- Comment #1 from sdyoung at miranda dot org  2007-08-08 16:47 ---
Fix:
I don't know.


-- 
   Summary: gcc allows negatively-sized arrays
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sdyoung at miranda dot org
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


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



[Bug libfortran/32977] New: [4.3 regression] All gfortran tests fail on Tru64 UNIX V4.0F: vsnprintf missing

2007-08-03 Thread gcc-bugzilla at gcc dot gnu dot org

As of 20070730, all gfortran tests fail on alpha-dec-osf4.0f:

25729:./PR19754_2.exe: /sbin/loader: Error: Unresolved symbol in
/amnt/sequoia/export/vol/gcc/obj/alpha/gcc-4.3.0-20070730/4.0f-gcc/alpha-dec-osf4.0f/./libgfortran/.libs/libgfortran.so.3:
vsnprintf
25729:./PR19754_2.exe: /sbin/loader: Fatal Error: this executable has
unresolvable symbols
FAIL: gfortran.dg/PR19754_2.f90  -O0  execution test

This was introduced by

2007-07-29  Thomas Koenig  [EMAIL PROTECTED]

PR libfortran/32858
PR libfortran/30814
[...]
* io/unix.c (init_error_stream):  Remove.
(tempfile):  Replace st_sprintf by sprintf.
(st_vprintf):  New function.
(st_printf):  Rewrite to call st_vprintf.

Even though HAVE_VSNPRINTF is undefined, __builtin_vsnprintf expands to
vsnprintf.

Environment:
System: OSF1 hindemith V4.0 1229 alpha
Machine: alpha

host: alpha-dec-osf4.0f
build: alpha-dec-osf4.0f
target: alpha-dec-osf4.0f
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf4.0f --build
alpha-dec-osf4.0f --target alpha-dec-osf4.0f --with-gmp=/vol/gcc
--with-mpfr=/vol/gcc --enable-languages=c,c++,fortran,java,objc,ada
--disable-libmudflap

How-To-Repeat:
Bootstrap and test as described above.


-- 
   Summary: [4.3 regression] All gfortran tests fail on Tru64 UNIX
V4.0F: vsnprintf missing
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf4.0f
  GCC host triplet: alpha-dec-osf4.0f
GCC target triplet: alpha-dec-osf4.0f


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



[Bug bootstrap/32744] New: [4.3 regression] ICE in build2_stat, at tree.c:3077 bootstrapping on Tru64 UNIX

2007-07-12 Thread gcc-bugzilla at gcc dot gnu dot org

On both alpha-dec-osf4.0f and alpha-dec-osf5.1b, current mainline (as of
r126588) fails to bootstrap: 
/vol/gccsrc/obj/gcc-4.3.0-20070712/4.0f-gcc/./gcc/xgcc
-B/vol/gccsrc/obj/gcc-4.3.0-20070712/4.0f-gcc/./gcc/
-B/vol/gcc/alpha-dec-osf4.0f/bin/ -B/vol/gcc/alpha-dec-osf4.0f/lib/ -isystem
/vol/gcc/alpha-dec-osf4.0f/include -isystem
/vol/gcc/alpha-dec-osf4.0f/sys-include -g -fkeep-inline-functions -O2  -O2 -g
-O2  -mieee -DIN_GCC-W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include  -pthread -g
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I.
-I../.././gcc -I/vol/gcc/src/gcc-dist/libgcc -I/vol/gcc/src/gcc-dist/libgcc/.
-I/vol/gcc/src/gcc-dist/libgcc/../gcc -I/vol/gcc/src/gcc-dist/libgcc/../include
 -DHAVE_CC_TLS -o _gcov_execl.o -MT _gcov_execl.o -MD -MP -MF _gcov_execl.dep
-DL_gcov_execl -c /vol/gcc/src/gcc-dist/libgcc/../gcc/libgcov.c
/vol/gcc/src/gcc-dist/libgcc/../gcc/libgcov.c: In function '__gcov_execl':
/vol/gcc/src/gcc-dist/libgcc/../gcc/libgcov.c:838: internal compiler error: in
build2_stat, at tree.c:3077

This happens at -O and -O0 as well.

I've last bootstrapped successfully on 20070612.

Environment:
System: OSF1 hindemith V4.0 1229 alpha
Machine: alpha

host: alpha-dec-osf4.0f
build: alpha-dec-osf4.0f
target: alpha-dec-osf4.0f
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf4.0f --build
alpha-dec-osf4.0f --target alpha-dec-osf4.0f --with-gmp=/vol/gcc
--with-mpfr=/vol/gcc --enable-languages=c,c++,fortran,java,objc,ada
--disable-libmudflap

How-To-Repeat:
Bootstrap mainline as described above.


-- 
   Summary: [4.3 regression] ICE in build2_stat, at tree.c:3077
bootstrapping on Tru64 UNIX
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf4.0f
  GCC host triplet: alpha-dec-osf4.0f
GCC target triplet: alpha-dec-osf4.0f


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



[Bug bootstrap/32745] New: [4.3 regression] ICE in set_expression_vuses at tree-ssa-pre.c:265 on Solaris 10/SPARC

2007-07-12 Thread gcc-bugzilla at gcc dot gnu dot org

Bootstrapping mainline on sparc-sun-solaris2.10 as of r126588 fails
building the sparcv9 stage2 libgcc:

/vol/gccsrc/obj/gcc-4.3.0-20070712/10-gcc/./gcc/xgcc
-B/vol/gccsrc/obj/gcc-4.3.0-20070712/10-gcc/./gcc/
-B/vol/gcc/sparc-sun-solaris2.10/bin/ -B/vol/gcc/sparc-sun-solaris2.10/lib/
-isystem /vol/gcc/sparc-sun-solaris2.10/include -isystem
/vol/gcc/sparc-sun-solaris2.10/sys-include -g -O2 -m64 -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   -I. -I. -I../../.././gcc
-I/vol/gcc/src/gcc-dist/libgcc -I/vol/gcc/src/gcc-dist/libgcc/.
-I/vol/gcc/src/gcc-dist/libgcc/../gcc -I/vol/gcc/src/gcc-dist/libgcc/../include
  -o _lshrdi3.o -MT _lshrdi3.o -MD -MP -MF _lshrdi3.dep -DL_lshrdi3 -c
/vol/gcc/src/gcc-dist/libgcc/../gcc/libgcc2.c \
/vol/gcc/src/gcc-dist/libgcc/../gcc/libgcc2.c: In function '__lshrti3':
/vol/gcc/src/gcc-dist/libgcc/../gcc/libgcc2.c:413: internal compiler error:
vector VEC(vuse_vec,base) replace domain error, in set_expression_vuses at
tree-ssa-pre.c:265

The file compiles at -O.

Environment:
System: SunOS thor 5.10 Generic_125100-10 sun4u sparc SUNW,Sun-Fire-V240
Architecture: sun4


host: sparc-sun-solaris2.10
build: sparc-sun-solaris2.10
target: sparc-sun-solaris2.10
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --with-gmp=/vol/gcc
--with-mpfr=/vol/gcc --enable-languages=c,c++,fortran,java,objc,ada
--disable-libmudflap

How-To-Repeat:
Bootstrap mainline as described above.


-- 
   Summary: [4.3 regression] ICE in set_expression_vuses at tree-
ssa-pre.c:265 on Solaris 10/SPARC
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: sparc-sun-solaris2.10
  GCC host triplet: sparc-sun-solaris2.10
GCC target triplet: sparc-sun-solaris2.10


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



[Bug libgcj/32651] New: [4.2/4.3 regression] libjava fails to build on IRIX 6.5

2007-07-06 Thread gcc-bugzilla at gcc dot gnu dot org

On both the 4.2 branch and mainline, libjava fails to build on
mips-sgi-irix6.5:

* sysdeps_dir isn't set in configure.host, so the generic locks.h is used
  which just errors out

* libgcj_interpreter is set to yes in the general mips-* clause in
  configure.host, but this cannot work for IRIX 6 since libffi supports
  closures only for the O32 ABI, N32 and N64 support is still missing

Environment:
System: IRIX64 columba 6.5 07010238 IP27



host: mips-sgi-irix6.5
build: mips-sgi-irix6.5
target: mips-sgi-irix6.5
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --enable-libgcj --with-gmp=/vol/gcc
--with-mpfr=/vol/gcc --enable-languages=c,c++,java --with-gnu-as
--with-as=/vol/gcc/lib/gas-2.17

How-To-Repeat:
Bootstrap either branch as reported above.


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2007-07-06 
17:24 ---
Fix:
Initial patch posted here:

http://gcc.gnu.org/ml/java-patches/2007-q3/msg00025.html


-- 
   Summary: [4.2/4.3 regression] libjava fails to build on IRIX 6.5
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: mips-sgi-irix6.5
  GCC host triplet: mips-sgi-irix6.5
GCC target triplet: mips-sgi-irix6.5


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



[Bug libgcj/32652] New: [4.3 regression] libgcj fails to build with --disable-interpreter

2007-07-06 Thread gcc-bugzilla at gcc dot gnu dot org

Even with the fix for PR libgcj/32651 (which sets libgcj_interpreter=no),
libgcj doesn't build on IRIX 6.5 (or any other platform) because several
types and classes from java-interp.h are used even with INTERPRETER
undefined.  This is a regression from 4.1 and 4.2 and can easily be
reproduced with --disable-interpreter.

Environment:
System: IRIX64 columba 6.5 07010238 IP27



host: mips-sgi-irix6.5
build: mips-sgi-irix6.5
target: mips-sgi-irix6.5
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --enable-libgcj --with-gmp=/vol/gcc
--with-mpfr=/vol/gcc --enable-languages=c,c++,java --with-gnu-as
--with-as=/vol/gcc/lib/gas-2.17

How-To-Repeat:
Bootstrap mainline with the patch from

http://gcc.gnu.org/ml/java-patches/2007-q3/msg00025.html

or just pass --disable-interpreter on any platform.


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2007-07-06 
17:32 ---
Fix:
The mail above contains a hacky patch to allow the compilation to complete,
but all libjava programs fail to link due to many unresolved symbols (no
surprise given the nature of the patch).


-- 
   Summary: [4.3 regression] libgcj fails to build with --disable-
interpreter
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: mips-sgi-irix6.5
  GCC host triplet: mips-sgi-irix6.5
GCC target triplet: mips-sgi-irix6.5


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



[Bug ada/32654] New: [4.2 regression] Ada comparison failure in exp_aggr.o on Tru64 UNIX V5.1B

2007-07-06 Thread gcc-bugzilla at gcc dot gnu dot org

Bootstrapping the current 4.2 branch on alpha-dec-osf5.1b with GCC 3.4 as
the bootstrap compiler, I get a comparison failure in exp_aggr.o:

Comparing stages 2 and 3
Bootstrap comparison failure!
./ada/exp_aggr.o differs
make[2]: *** [compare] Error 1

There's only a minimal difference in the debugging info:

--- prev-gcc/exp_aggr.s Fri Jun 15 21:55:38 2007
+++ gcc/exp_aggr.s  Fri Jun 15 21:56:39 2007
@@ -13799,7 +13799,7 @@
beq $0,$L1053
 $L974:
 $LBB210:
- #.stabn   68,0,3263,$LM2081
+ #.stabn   68,0,3155,$LM2081
 $LM2081:
bis $31,$31,$1
 $L973:

This happens since at least 20070506 and only on alpha-dec-osf5.1b,
alpha-dec-osf4.0f is unaffected (as is mainline unless I'm mistaken).

Environment:
System: OSF1 bartok V5.1 2650 alpha
Machine: alpha

host: alpha-dec-osf5.1b
build: alpha-dec-osf5.1b
target: alpha-dec-osf5.1b
configured with: /vol/gcc/src/gcc-4.2-branch-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf5.1b --build
alpha-dec-osf5.1b --target alpha-dec-osf5.1b --with-gmp=/vol/gcc
--with-mpfr=/vol/gcc --enable-languages=c,c++,fortran,java,objc,ada

How-To-Repeat:
Bootstrap the 4.2 branch as described above.


-- 
   Summary: [4.2 regression] Ada comparison failure in exp_aggr.o on
Tru64 UNIX V5.1B
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf5.1b
  GCC host triplet: alpha-dec-osf5.1b
GCC target triplet: alpha-dec-osf5.1b


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



[Bug ada/32547] New: gnat.dg tasking tests fail on IRIX 5.3

2007-06-29 Thread gcc-bugzilla at gcc dot gnu dot org

All gnat.dg tasking tests FAIL on IRIX 5.3 since the platform lacks thread
support:

failed run-time assertion : Tasking not implemented on this configuration
FAIL: gnat.dg/curr_task.adb execution test

Instead of failing, the tests should be marked UNSUPPORTED as is done for
ACATS.

Environment:
System: IRIX lyra 5.3 11091812 IP22 mips



host: mips-sgi-irix5.3
build: mips-sgi-irix5.3
target: mips-sgi-irix5.3
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --with-gnu-as
--with-as=/vol/gcc/lib/gas-2.17 --with-gmp=/vol/gcc --with-mpfr=/vol/gcc
--enable-languages=c,c++,fortran,objc,ada --disable-libmudflap

How-To-Repeat:
Bootstrap and test mainline as described above.


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2007-06-29 
15:11 ---
Fix:
It should be possible to handle this in gcc/testsuite/lib/gnat.exp via
${tool}_check_unsupported_p.


-- 
   Summary: gnat.dg tasking tests fail on IRIX 5.3
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: mips-sgi-irix5.3
  GCC host triplet: mips-sgi-irix5.3
GCC target triplet: mips-sgi-irix5.3


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



[Bug ada/32548] New: gnat.dg tests for non-default multilib fail

2007-06-29 Thread gcc-bugzilla at gcc dot gnu dot org

When running the gnat.dg tests on multilib-targets (like
sparc-sun-solaris2*, i386-pc-solaris2*, or mips-sgi-irix6*), most tests for
a non-default multilib fail with confusing error messages:

Running /vol/gcc/src/gcc/gcc/testsuite/gnat.dg/dg.exp ...
Executing on host: /vol/gccsrc/obj/gcc-4.3.0-20070614/10-gcc/gcc/gnatmake
-I/vol/gccsrc/obj/gcc-4.3.0-20070614/10-gcc/gcc/ada/rts
--GCC=/vol/gccsrc/obj/gcc-4.3.0-20070614/10-gcc/gcc/xgcc
--GNATBIND=/vol/gccsrc/obj/gcc-4.3.0-20070614/10-gcc/gcc/gnatbind
--GNATLINK=/vol/gccsrc/obj/gcc-4.3.0-20070614/10-gcc/gcc/gnatlink -cargs
-B/vol/gccsrc/obj/gcc-4.3.0-20070614/10-gcc/gcc -largs
--GCC=/vol/gccsrc/obj/gcc-4.3.0-20070614/10-gcc/gcc/xgcc
-B/vol/gccsrc/obj/gcc-4.3.0-20070614/10-gcc/gcc -margs -q -f
/vol/gcc/src/gcc/gcc/testsuite/gnat.dg/abstract_with_anonymous_result.adb   
-I/vol/gccsrc/obj/gcc-4.3.0-20070614/10-gcc/gcc/ada/rts  -lm   -m64 -o
./abstract_with_anonymous_result.exe(timeout = 300)
abstract_with_anonymous_result.adb:6:12: alignment for I must be at least 8
abstract_with_anonymous_result.adb:10:12: alignment for New_I must be at
least 8
gnatmake:
/vol/gcc/src/gcc/gcc/testsuite/gnat.dg/abstract_with_anonymous_result.adb
compilation error
compiler exited with status 1
output is:
abstract_with_anonymous_result.adb:6:12: alignment for I must be at least 8
abstract_with_anonymous_result.adb:10:12: alignment for New_I must be at
least 8
gnatmake:
/vol/gcc/src/gcc/gcc/testsuite/gnat.dg/abstract_with_anonymous_result.adb
compilation error

FAIL: gnat.dg/abstract_with_anonymous_result.adb (test for excess errors)

Per PR ada/5911, multilibs are not supported in Ada yet.

Environment:
System: SunOS thor 5.10 Generic_125100-08 sun4u sparc SUNW,Sun-Fire-V240
Architecture: sun4


host: sparc-sun-solaris2.10
build: sparc-sun-solaris2.10
target: sparc-sun-solaris2.10
configured with: /vol/gcc/src/gcc/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --with-gmp=/vol/gcc
--with-mpfr=/vol/gcc --enable-languages=c,c++,fortran,java,objc,ada
--disable-libmudflap

How-To-Repeat:
Bootstrap and test mainline (or the 4.2 branch) as described above.


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2007-06-29 
15:23 ---
Fix:
When gcc is invoked for a non-default multilib, it should print a message
indicating missing multilib support and the tests could be marked
UNSUPPORTED.


-- 
   Summary: gnat.dg tests for non-default multilib fail
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: sparc-sun-solaris2.10
  GCC host triplet: sparc-sun-solaris2.10
GCC target triplet: sparc-sun-solaris2.10


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



[Bug c/32536] New: wrong generated code on complex statement;

2007-06-28 Thread gcc-bugzilla at gcc dot gnu dot org


sample code:

#include stdio.h

int main()
{
  char cp[2];
  cp[0] = 'A';
  cp[1] = 'B';
  printf(%x %x\n,cp[0],cp[1]);
  cp[0] ^= (cp[1]^=(cp[0]^=cp[1]));
  printf(%x %x\n,cp[0],cp[1]);
  return 0;
}

The complex byte swapping instruction is far fetched but seems legal.
It actually swaps bytes if compiled with gcc -O3. Without optimization, 
one of the bytes receives a '\0'. 
   This instruction seemed to work properly with versions 3.

Environment:
System: Linux lpnp204 2.4.21-47.0.1.EL.cernsmp #1 SMP Thu Oct 19 16:35:52 CEST
2006 i686 i686 i386 GNU/Linux
Architecture: i686


host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure

How-To-Repeat:
Compile the code above with various degrees of optimization.


-- 
   Summary: wrong generated code on complex statement;
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: astier at lpnp204 dot in2p3 dot fr
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug libgomp/32538] New: All libgomp tests fail to link on IRIX 6: copysignl undefined

2007-06-28 Thread gcc-bugzilla at gcc dot gnu dot org

All libgomp tests fail to link on IRIX 6:

Executing on host: /vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/xgcc
-B/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/
/vol/gcc/src/gcc-dist/libgomp/testsuite/libgomp.fortran/appendix-a/a.16.1.f90 
-B/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/mips-sgi-irix6.5/./libgomp/
-I/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/mips-sgi-irix6.5/./libgomp
-I/vol/gcc/src/gcc-dist/libgomp/testsuite/.. -fmessage-length=0 -fopenmp  -O0  
  -L/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/mips-sgi-irix6.5/./libgomp/.libs
-lgomp
-L/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/mips-sgi-irix6.5/./libgomp/../libgfortran/.libs
-lgfortranbegin -lgfortran -lm   -o ./a.16.1.exe(timeout = 300)
ld32: ERROR   33 : Unresolved data symbol copysignl -- 1st referenced by
/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/libgcc.a(_divtc3.o).
Use linker option -v to see when and which objects, archives and dsos
are loaded.  
ld32: INFO152: Output file removed because of error.
collect2: ld returned 2 exit status
compiler exited with status 1

This happens because libgcc contains an undefined reference to copysignl.
This function is present in libm, but libm is before libgcc on the linker
command line, as can be seen with -v:

 /vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/collect2 -call_shared
-no_unresolved -init __gcc_init -fini __gcc_fini -_SYSTYPE_SVR4 -woff 131 -n32
-o ./a.16.1.exe /usr/lib32/mips3/crt1.o
/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/irix-crti.o
/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/crtbegin.o
-L/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/mips-sgi-irix6.5/./libgomp/.libs
-L/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/mips-sgi-irix6.5/./libgomp/../libgfortran/.libs
-L/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc
-L/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/mips-sgi-irix6.5/./libgomp
-L/lib/../lib32 -L/usr/lib/../lib32 /var/tmp//ccCchLrr.o -lgomp -lgfortranbegin
-lgfortran -lm -lgomp -dont_warn_unused -lgcc -lgcc_eh -warn_unused
-L/usr/lib32/mips3 -L/usr/lib32 -dont_warn_unused -lpthread -lc -warn_unused
-dont_warn_unused -lgcc -lgcc_eh -warn_unused
/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/crtend.o
/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/irix-crtn.o /usr/lib32/mips3/crtn.o

The 4.2 branch is affected as well.

Environment:
System: IRIX64 columba 6.5 07010238 IP27



host: mips-sgi-irix6.5
build: mips-sgi-irix6.5
target: mips-sgi-irix6.5
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --with-gnu-as
--with-as=/vol/gcc/lib/gas-2.17 --enable-libgcj --with-gmp=/vol/gcc
--with-mpfr=/vol/gcc --disable-libmudflap
--enable-languages=c,ada,c++,fortran,objc --no-create --no-recursion

How-To-Repeat:
Bootstrap and test as described above.


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2007-06-28 
17:35 ---
Fix:
There are two possible solutions: 

* add -lgcc -lm to the link_gomp spec (this is obviously a hack)

* add -lm to the libgcc spec (this seems to be the proper solution)

Comments?


-- 
   Summary: All libgomp tests fail to link on IRIX 6: copysignl
undefined
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgomp
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: mips-sgi-irix6.5
  GCC host triplet: mips-sgi-irix6.5
GCC target triplet: mips-sgi-irix6.5


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



[Bug libstdc++/32499] New: libstdc++ testsuite fails on platforms without ranlib

2007-06-25 Thread gcc-bugzilla at gcc dot gnu dot org

I noticed that the libstdc++ testsuite fails to run on mips-sgi-irix6.5 and
mips-sgi-irix5.3::

ERROR: tcl error sourcing
/vol/gcc/src/gcc-dist/libstdc++-v3/testsuite/libstdc++-abi/abi.exp.
ERROR: could not link libtestc++.a
while executing
error could not link libtestc++.a
(procedure v3-build_support line 82)
invoked from within
v3-build_support
(file /vol/gcc/src/gcc-dist/libstdc++-v3/testsuite/libstdc++-abi/abi.exp
line 22)
invoked from within
source /vol/gcc/src/gcc-dist/libstdc++-v3/testsuite/libstdc++-abi/abi.exp
(uplevel body line 1)
invoked from within
uplevel #0 source
/vol/gcc/src/gcc-dist/libstdc++-v3/testsuite/libstdc++-abi/abi.exp
invoked from within
catch uplevel #0 source $test_file_name

It turns out that this happens since the platform lacks ranlib, but
testsuite/lib/libstdc++.exp (v3-build_support) uses either
$RANLIB_FOR_TARGET or ranlib.  Of course, trying to execute a non-existant
command fails.

The toplevel Makefile only passes in RANLIB=:, not RANLIB_FOR_TARGET.

This was most likely introduced by this patch:

2007-03-15  Hans-Peter Nilsson  [EMAIL PROTECTED]

* testsuite/lib/libstdc++.exp (v3-build_support) ar: If it
exists, use env(AR_FOR_TARGET).  Log the command.
ranlib: Similar.

Environment:
System: IRIX64 columba 6.5 07010238 IP27



host: mips-sgi-irix6.5
build: mips-sgi-irix6.5
target: mips-sgi-irix6.5
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --with-gnu-as
--with-as=/vol/gcc/lib/gas-2.17 --enable-libgcj --with-gmp=/vol/gcc
--with-mpfr=/vol/gcc --disable-libmudflap
--enable-languages=c,ada,c++,fortran,objc --no-create --no-recursion

How-To-Repeat:
Bootstrap and test mainline or the 4.2 branch as above.


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2007-06-25 
15:23 ---
Fix:
This can be worked around by setting RANLIB_FOR_TARGET=: in the
environment, but this shouldn't be necessary.


-- 
   Summary: libstdc++ testsuite fails on platforms without ranlib
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: mips-sgi-irix6.5
  GCC host triplet: mips-sgi-irix6.5
GCC target triplet: mips-sgi-irix6.5


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



[Bug libgcj/32462] New: Linking libgcj.so fails on Solaris 10/x86

2007-06-22 Thread gcc-bugzilla at gcc dot gnu dot org

A mainline bootstrap as of 20070618 on Solaris 10/x86 with the bundled gas
2.15 fails to link libgcj.so:

ld: fatal: relocation error: R_386_GOTOFF: file java/.libs/process-Posix.o:
symbol java::lang::PosixProcess::queueLock: relocation must bind locally
collect2: ld returned 1 exit status
make[3]: *** [libgcj.la] Error 1

Performing the same link on Solaris 11 gives

ld: fatal: relocation error: R_386_GOTOFF: file java/.libs/process-Posix.o:
symbol java::lang::PosixProcess::queueLock: a GOT relative relocation must
reference a local symbol
ld: fatal: relocation error: R_386_GOTOFF: file java/.libs/process-Posix.o:
symbol java::lang::PosixProcess::queueLock: a GOT relative relocation must
reference a local symbol
ld: fatal: relocation error: R_386_GOTOFF: file java/.libs/process-Posix.o:
symbol java::lang::PosixProcess::processManager: a GOT relative relocation must
reference a local symbol
ld: fatal: relocation error: R_386_GOTOFF: file java/.libs/process-Posix.o:
symbol java::lang::PosixProcess::queueLock: a GOT relative relocation must
reference a local symbol
ld: fatal: relocation error: R_386_GOTOFF: file java/.libs/process-Posix.o:
symbol java::lang::PosixProcess::processManager: a GOT relative relocation must
reference a local symbol
ld: fatal: relocation error: R_386_GOTOFF: file java/.libs/process-Posix.o:
symbol java::lang::PosixProcess::processManager: a GOT relative relocation must
reference a local symbol
ld: fatal: relocation error: R_386_GOTOFF: file java/.libs/process-Posix.o:
symbol java::lang::PosixProcess::processManager: a GOT relative relocation must
reference a local symbol
ld: fatal: relocation error: R_386_GOTOFF: file java/.libs/process-Posix.o:
symbol java::lang::PosixProcess::processManager: a GOT relative relocation must
reference a local symbol
ld: fatal: relocation error: R_386_GOTOFF: file java/.libs/process-Posix.o:
symbol java::lang::PosixProcess::queueLock: a GOT relative relocation must
reference a local symbol
ld: fatal: relocation error: R_386_GOTOFF: file java/.libs/process-Posix.o:
symbol java::lang::PosixProcess::processManager: a GOT relative relocation must
reference a local symbol
collect2: ld returned 1 exit status

I'm currently investigating if using the native /usr/ccs/bin/as, gas 2.17
or gld 2.17 makes a difference.

Environment:
System: SunOS erebus 5.11 snv_60 i86pc i386 i86pc
Architecture: i86pc


host: i386-pc-solaris2.10
build: i386-pc-solaris2.10
target: i386-pc-solaris2.10
configured with: /vol/gcc/src/gcc/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --with-gnu-as
--with-as=/usr/sfw/bin/gas --disable-multilib --with-gmp=/vol/gcc
--with-mpfr=/vol/gcc --enable-languages=c,c++,fortran,java,objc,ada
--disable-libmudflap

How-To-Repeat:
Bootstrap mainline as described above.


-- 
   Summary: Linking libgcj.so fails on Solaris 10/x86
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: i386-pc-solaris2.10
  GCC host triplet: i386-pc-solaris2.10
GCC target triplet: i386-pc-solaris2.10


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



[Bug libgcj/32465] New: Linking 64-bit libgcj.so fails on Solaris 10/x86: non-PIC code despite -fPIC

2007-06-22 Thread gcc-bugzilla at gcc dot gnu dot org

A mainline bootstrap as of 20070618 on Solaris 10/x86 with the bundled gas
2.15 and my patch to support boehm-gc for x86-64

 http://gcc.gnu.org/ml/java-patches/2007-q2/msg00330.html

fails when linking the 64-bit libgcj:

[ca. 6800 lines omitted]
gnu::gcj::runtime::FinalizerThread::finalizer_ready0x602   
gnu/gcj/.libs/runtime.o
ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status

I've checked for some of the affected object files that they have been
built with -fPIC, nonetheless text relocations remain, thus breaking the
link.

Environment:
System: SunOS erebus 5.11 snv_60 i86pc i386 i86pc
Architecture: i86pc


host: i386-pc-solaris2.10
build: i386-pc-solaris2.10
target: i386-pc-solaris2.10
configured with: /vol/gcc/src/gcc/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --with-gnu-as
--with-as=/usr/sfw/bin/gas --with-gmp=/vol/gcc --with-mpfr=/vol/gcc
--enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap

How-To-Repeat:
Bootstrap mainline as described above.


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2007-06-22 
17:42 ---
Fix:
It is possible to link with -mimpure-text as a workaround.


-- 
   Summary: Linking 64-bit libgcj.so fails on Solaris 10/x86: non-
PIC code despite -fPIC
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: i386-pc-solaris2.10
  GCC host triplet: i386-pc-solaris2.10
GCC target triplet: i386-pc-solaris2.10


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



[Bug pending/32403] New:

2007-06-19 Thread gcc-bugzilla at gcc dot gnu dot org
NOTE: Defaulting component because reported component no longer exists


Environment:
System: Linux marko2 2.6.15-28-686 #1 SMP PREEMPT Thu Feb 1 16:14:07 UTC 2007
i686 GNU/Linux
Architecture: i686


host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: m68hc11-unknown-none
configured with: ../src/configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --with-gnu-as --with-gnu-ld --enable-nls
--without-included-gettext --disable-checking --enable-languages=c
--build=i486-linux-gnu --host=i486-linux-gnu --target=m68hc11 --without-headers

How-To-Repeat:
When reporting a compiler error, preprocessor output mu


how to correct or work around the problem, if known (multiple lines)


-- 
   Product: gcc
   Version: 3.3.5
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: pending
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: marko at localhost dot localhost
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: m68hc11-unknown-none


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



[Bug libfortran/32345] New: Unconditional snprintf use breaks all gfortran exec tests on Tru64 UNIX V4.0F

2007-06-14 Thread gcc-bugzilla at gcc dot gnu dot org

All gfortran execute tests fail on alpha-dec-osf4.0f since snprintf is
missing in libc, but used in libgfortran.

Environment:
System: OSF1 hindemith V4.0 1229 alpha
Machine: alpha

host: alpha-dec-osf4.0f
build: alpha-dec-osf4.0f
target: alpha-dec-osf4.0f
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf4.0f --build
alpha-dec-osf4.0f --target alpha-dec-osf4.0f --with-gmp=/vol/gcc
--with-mpfr=/vol/gcc --enable-languages=c,c++,fortran,java,objc,ada
--disable-libmudflap

How-To-Repeat:
Bootstrap and test on alpha-dec-osf4.0f.


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2007-06-14 
16:40 ---
Fix:
The reference is from runtime/backtrace.c (show_backtrace) and can easily
be changed to use sprintf() is snprintf() is unavailable.


-- 
   Summary: Unconditional snprintf use breaks all gfortran exec
tests on Tru64 UNIX V4.0F
   Product: gcc
   Version: 3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf4.0f
  GCC host triplet: alpha-dec-osf4.0f
GCC target triplet: alpha-dec-osf4.0f


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



[Bug c++/32325] New: cc1plus ICE configuring libstdc++ on Tru64 UNIX V5.1B: SEGV in rtl_verify_flow_info

2007-06-13 Thread gcc-bugzilla at gcc dot gnu dot org

During a mainline bootstrap on alpha-dec-osf5.1b, the libstdc++ configure
failed:

checking for exception model to use... configure: error: unable to detect
exception model
make[1]: *** [configure-target-libstdc++-v3] Error 1

config.log reveals:

configure:13794: checking for exception model to use
configure:13838:  /vol/gccsrc/obj/gcc-4.3.0-20070612/5.1b-gcc/./gcc/xgcc
-shared-libgcc -B/vol/gccsrc/obj/gcc-4.3.0-20070612/5.1b-gcc/./gcc -nostdinc++
-L/vol/gccsrc/obj/gcc-4.3.0-20070612/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/src
-L/vol/gccsrc/obj/gcc-4.3.0-20070612/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/src/.libs
-B/vol/gcc/alpha-dec-osf5.1b/bin/ -B/vol/gcc/alpha-dec-osf5.1b/lib/ -isystem
/vol/gcc/alpha-dec-osf5.1b/include -isystem
/vol/gcc/alpha-dec-osf5.1b/sys-include -c -S  conftest.cc 5
configure: In function 'void foo()':
configure:13836: error: end insn 27 for block 7 not found in the insn stream
configure:13836: error: head insn 24 for block 7 not found in the insn stream
configure:13836: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://gcc.gnu.org/bugs.html for instructions.
configure:13841: $? = 1
configure:13870: error: unable to detect exception model

This happens with the following conftest.cc:

struct S { ~S(); };
void bar();
void foo()
{
  S s;
  bar();
}

 % ./cc1plus conftest.cc
 void foo()
Analyzing compilation unit
Performing interprocedural optimizations
 visibility early_local_cleanups inlineAssembling functions:
 void foo()
conftest.cc: In function 'void foo()':
conftest.cc:7: error: end insn 27 for block 7 not found in the insn stream
conftest.cc:7: error: head insn 24 for block 7 not found in the insn stream
conftest.cc:7: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://gcc.gnu.org/bugs.html for instructions.

Running gdb reveals

Program received signal SIGSEGV, Segmentation fault.
rtl_verify_flow_info () at /vol/gcc/src/gcc-dist/gcc/cfgrtl.c:2005
(gdb) where
#0  rtl_verify_flow_info () at /vol/gcc/src/gcc-dist/gcc/cfgrtl.c:2005
#1  0x000120516638 in verify_flow_info () at
/vol/gcc/src/gcc-dist/gcc/cfghooks.c:245
#2  0x000120618934 in commit_edge_insertions () at
/vol/gcc/src/gcc-dist/gcc/cfgrtl.c:1467
#3  0x000120415bcc in alpha_gp_save_rtx () at
/vol/gcc/src/gcc-dist/gcc/config/alpha/alpha.c:4784
#4  0x0001206406fc in gen_exception_receiver () at
/vol/gcc/src/gcc-dist/gcc/config/alpha/alpha.md:7019
#5  0x000120314dc8 in finish_eh_generation () at
/vol/gcc/src/gcc-dist/gcc/except.c:1633
#6  0x000120314f98 in rest_of_handle_eh () at
/vol/gcc/src/gcc-dist/gcc/except.c:3985
#7  0x000120421978 in execute_one_pass (pass=0x0) at
/vol/gcc/src/gcc-dist/gcc/passes.c:1124
#8  0x000120421c48 in execute_pass_list (pass=0x0) at
/vol/gcc/src/gcc-dist/gcc/passes.c:1177
#9  0x000120421c5c in execute_pass_list (pass=0x0) at
/vol/gcc/src/gcc-dist/gcc/passes.c:1178
#10 0x0001204fef44 in tree_rest_of_compilation (fndecl=0x0) at
/vol/gcc/src/gcc-dist/gcc/tree-optimize.c:406
#11 0x0001202535c8 in c_expand_body (fndecl=0x140137d80) at
/vol/gcc/src/gcc-dist/gcc/c-common.c:4331
#12 0x0001201ea958 in expand_body (fn=0x18de60) at
/vol/gcc/src/gcc-dist/gcc/cp/semantics.c:3136
#13 0x000120423f60 in cgraph_expand_function (node=0x18de60) at
/vol/gcc/src/gcc-dist/gcc/cgraphunit.c:1073
#14 0x000120427400 in cgraph_optimize () at
/vol/gcc/src/gcc-dist/gcc/cgraphunit.c:1142
#15 0x00012015e054 in cp_write_global_declarations () at
/vol/gcc/src/gcc-dist/gcc/cp/decl2.c:3305
#16 0x0001204432e0 in toplev_main (argc=1, argv=0x0) at
/vol/gcc/src/gcc-dist/gcc/toplev.c:1064
#17 0x00012029fe98 in main (argc=1075019136, argv=0x11fffbb30) at
/vol/gcc/src/gcc-dist/gcc/main.c:35
(gdb) p x
$1 = 0x0

I.e. rtl_verify_flow_info dereferences a NULL pointer.  This happens only
on alpha-dec-osf5.1b, alpha-dec-osf4.0f is unaffected.

Environment:
System: OSF1 bartok V5.1 2650 alpha
Machine: alpha

host: alpha-dec-osf5.1b
build: alpha-dec-osf5.1b
target: alpha-dec-osf5.1b
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf5.1b --build
alpha-dec-osf5.1b --target alpha-dec-osf5.1b --with-gmp=/vol/gcc
--with-mpfr=/vol/gcc --enable-languages=c,c++,fortran,java,objc,ada
--disable-libmudflap

How-To-Repeat:
Bootstrap as described above.


-- 
   Summary: cc1plus ICE configuring libstdc++ on Tru64 UNIX V5.1B:
SEGV in rtl_verify_flow_info
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf5.1b
  GCC host triplet: alpha-dec-osf5.1b
GCC target triplet: 

[Bug target/32264] New: gcc 4.2.0 compiled vanilla kernel 2.4.34.5 crashes when VIA C3 optimized -march=c3

2007-06-08 Thread gcc-bugzilla at gcc dot gnu dot org

When Linux vanilla kernel 2.4.34.5 is compiled with -march=c3 (VIA C3)
- kernel crashes after boot on a VIA C3
.config: CONFIG_MCYRIXIII=y

Environment:
System: Linux bongo 2.4.34.5-ARXc3 COHERENT #9-ARX (Build 3359) Fri Jun 8
16:41:33 CEST 2007 i686 i686 i386 GNU/Linux
Architecture: i686


host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu VIA C3 -march=c3
configured with: /home/axel/p/rpm/BUILD/gcc-4.2.0/configure --prefix=/opt/gcc4
--exec-prefix=/opt/gcc4 --srcdir=/home/axel/p/rpm/BUILD/gcc-4.2.0
--enable-shared --enable-languages=c,c++,objc

How-To-Repeat:
compile vanilla linux kernel 2.4.34.5 with CONFIG_MCYRIXIII=y and boot
the kernel on a VIA C3 - crash


--- Comment #1 from axel at freakout dot de  2007-06-08 20:17 ---
Fix:
Compile kernel with gcc 4.1.2 Ok and working with -march=c3


-- 
   Summary: gcc 4.2.0 compiled vanilla kernel 2.4.34.5 crashes when
VIA C3 optimized -march=c3
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: axel at freakout dot de
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu VIA C3 -march=c3


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



[Bug c++/31816] New: If a function foo is defined before declaring a template class AT, overloaded version of foo defined after the class declaration will not be available within class AT.

2007-05-04 Thread gcc-bugzilla at gcc dot gnu dot org


Let us consider the following code:
-
void qHash(double) {}

template class T
struct QSet
{
  void foo()
  {
qHash(T());
  }
};

// void qHash(double) {} // ok if placed here
void qHash(int*) {}

int main()
{
  QSetdouble s;
  s.foo(); // ok

  QSetint* sp;
  sp.foo(); // do not compile, qHash(int*) is not considered.
}
-

It does not compile, because the overloaded version of qHash() for
int* is not available in QSet, even if QSet is instantiated after the
declaration of qHash(int*). If no qHash function is defined before the
declaration of QSet, it works fine. Although I'm not absolutely
certain that this code is valid, my intuition tells me this behavior
is strongly suspect ..

It works fine with g++ 4.0.4, 3.3 and 2.95.

Environment:
System: Linux stageuei9 2.6.18-3-686 #1 SMP Mon Dec 4 16:41:14 UTC 2006 i686
GNU/Linux
Architecture: i686


host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-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
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --with-tune=i686
--enable-checking=release i486-linux-gnu

How-To-Repeat:

Compile the given code.


--- Comment #1 from nicolas dot burrus at ensta dot fr  2007-05-04 14:31 
---
Fix:

Do not overload a function before and after a template class
using it.


-- 
   Summary: If a function foo is defined before declaring a template
class AT, overloaded version of foo defined after the
class declaration will not be available within class
AT.
   Product: gcc
   Version: 4.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nicolas dot burrus at ensta dot fr
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


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



[Bug c++/31652] New: postfix increment semantics implemented incorrectly

2007-04-21 Thread gcc-bugzilla at gcc dot gnu dot org

g++ parses the code correctly and calls the correct overloaded
increment operators, but in the wrong postfix order.  The semantics of
postfix are to take the rvalue before invoking the method.  Note this
is not related to multiple reference ordering between sequence points
as the object is only referenced once.  Although I have not checked
postfix decrement, it may have the same semantic problem and it is
trivial to adapt the supplied code.

Environment:
System: Linux dbox 2.6.18-3-686 #1 SMP Sun Dec 10 19:37:06 UTC 2006 i686
GNU/Linux
Architecture: i686


host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-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
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --with-tune=i686
--enable-checking=release i486-linux-gnu

How-To-Repeat:
cat  a.cpp
#include iostream

class C
{
public:
  int v;

  C( int v ) : v( v ) {}

  C  operator++( void ) { v++;  return *this; }
  C  operator++( int )  { v += 100; return *this; }
};

main()
{
  C a( 0 );
  C b( 0 );

  std::cout  a:  a.v  std::endl;  // 0
  std::cout  b:  b.v  std::endl;  // 0

  b = ++a;

  std::cout  a:  a.v  std::endl;  // 1
  std::cout  b:  b.v  std::endl;  // 1

  b = a++;

  std::cout  a:  a.v  std::endl;  // 101
  std::cout  b:  b.v  std::endl;  // should be 1, not 101!
}
^D
 g++ a.cpp ; ./a.out
a:0
b:0
a:1
b:1
a:101
b:101


--- Comment #1 from hayward at loup dot net  2007-04-21 23:39 ---
Fix:
Execute postfix methods *after* evaluating the expression they are in.


-- 
   Summary: postfix increment semantics implemented incorrectly
   Product: gcc
   Version: 4.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hayward at loup dot net
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


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



[Bug target/31486] New: ICE with vector code when -mno-sse2 on amd64

2007-04-05 Thread gcc-bugzilla at gcc dot gnu dot org

Compilation of the attached code yields an ICE in certain cases.

Environment:
System: Linux chii 2.6.20 #3 SMP Sun Feb 11 23:52:47 EET 2007 x86_64 GNU/Linux
Architecture: x86_64


host: x86_64-pc-linux-gnu
build: x86_64-pc-linux-gnu
target: x86_64-pc-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
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release
x86_64-linux-gnu

How-To-Repeat:
Compile this code:
typedef double ss2 __attribute__((vector_size(2*sizeof(double;
ss2 b = {1,1};
extern ss2 a2(ss2 a,ss2 b);
void test2() { b = a2(b,b); }
With these commandline options:
gcc-4.1 -mno-sse2 -S -o- test3.c
The output comes as follows:
.file   test3.c
.globl b
.data
.align 16
.type   b, @object
.size   b, 16
b:
.long   0
.long   1072693248
.long   0
.long   1072693248
test3.c: In function 'test2':
test3.c:6: internal compiler error: in emit_move_insn, at expr.c:3162
Please submit a full bug report,
with preprocessed source if appropriate.
(rest of output omitted for brevity)
It does not occur if double is changed to float, long double, short,
int or char.
It does occur if double, long int or long long int is used.
It does not occur if 2 is changed to 4.

Architecture:
CPU=AMD Athlon(tm) 64 X2 Dual Core Processor 4600+
CPU features=fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat
pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt lm 3dnowext 3dnow
pni lahf_lm cmp_legacy

GCC is:
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
--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.2 20061115 (prerelease) (Debian 4.1.1-21)


-- 
   Summary: ICE with vector code when -mno-sse2 on amd64
   Product: gcc
   Version: 4.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bisqwit at bisqwit dot iki dot fi
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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



[Bug c++/31289] New: gcc412 elides code in operator delete() override method

2007-03-20 Thread gcc-bugzilla at gcc dot gnu dot org

// BUG DEMO for gcc 4.1.2 (and 4.1.1) for 32-bit x86
//
// If operator delete() is over-ridden in a base class, then
// if the implementation of delete() stores into the storage used
// by the object, the store seems to be removed by the compiler
// (maybe because the compiler thinks stores to a deleted object 
// are dead code?  Or may be the casts of void * cause trouble
// with the C99 aliasing rules??)
//
//   Only occurs with g++ -O3
//   Occurs using native gcc on 32-bit x86.  
//   Does NOT occur with 64-bit x86.
//   Does NOT occur with gcc 3.2.3
//
// The following program is a skeletal memory manager which maintains
// a separate free-list for each size object.  Deleted objects are
// kept in a singly-linked list.  operator delete() casts the void *
// pointer to be a pointer to an internal struct in order to store
// a next pointer in the first word of the storage block.   The
// store through this cast pointer seems to be lost.
//
// TO DEMO THE PROBLEM:
//g++ -O3 thisfile.cpp  ./a.out
//(prints ERROR and then segfaults if the bug is there)
//
// -Jim Avera ([EMAIL PROTECTED])
// Please copy [EMAIL PROTECTED] [EMAIL PROTECTED] on all correspondence
//
#include stdio.h
#include stdlib.h

const size_t MaxSize = 100;
class MyHeap {
public:
  MyHeap();
  ~MyHeap() {}
  void * Malloc(const size_t bytes_needed);
  void   Free(void * ptr_to_free, size_t how_big_it_is);
  void   Dump(void);

  struct Node {
Node *next;
  };
private:
  Node *Heads[MaxSize];
};

MyHeap::MyHeap() {
  printf(MyHeap constructed\n);
  for (int i=0; i  MaxSize; ++i) {
Heads[i] = 0;
  }
}
void MyHeap::Dump(void)
{
  printf(Dump of free-list data:\n);
  int num_empties = 0;
  for (int i=0; i  MaxSize; ++i) {
if (Heads[i] == 0) {
  ++num_empties;
} else {
  printf(  Heads[%d] = %p\n, i, Heads[i]);
  Node * next_node = Heads[i]-next;
  if (next_node != 0) {
// For this test program, there should be exactly one item
printf(  ERROR: Expecting only one free item on list\n);
while (next_node != 0) {
  printf(next = %p\n, next_node);
  next_node = next_node-next;
}
exit(1); // usually segfaults before getting here
  }
}
  }
  printf((%d lists are empty)\n, num_empties);
}
void * MyHeap::Malloc(const size_t bytes_needed) 
{
  if (bytes_needed  sizeof(Node) || bytes_needed  MaxSize) {
printf(MyHeap::Malloc - object too small or too large\n);
exit(1);
  }
  if (Heads[bytes_needed] == 0) {
// Pre-charge the free list with more storage
// (just one object for this test)
Node * newnode = static_castNode *( malloc(bytes_needed) );
newnode-next = 0;
Heads[bytes_needed] = newnode;
  }
  // Detach the first from the list
  Node * node = Heads[bytes_needed];
  Heads[bytes_needed] = node-next;
  return node;
}
void MyHeap::Free(void * ptr_to_free, size_t how_big_it_is)
{
  // Put object on the free list
  Node * node = static_castNode *(ptr_to_free);
  node-next = Heads[how_big_it_is];
  Heads[how_big_it_is] = node;
}


// The memory-manager object
MyHeap my_pool;

class base {
public:
  void * operator new(size_t bytes_needed)
  {
void * raw_mem = my_pool.Malloc(bytes_needed);
return(raw_mem);
  }

  void operator delete(void * ptr_to_free,  size_t how_big_it_is) 
  {
my_pool.Free(ptr_to_free, how_big_it_is);
  }
};

class middle : public base {
public:
  virtual ~middle() { }
};

class derived : public middle {
public:
  derived() {
i = ;
j = ;
k = ;
  }
  virtual ~derived() {
  }
  int i,j,k;
};

int main() {
  setbuf(stdout,NULL); setbuf(stderr,NULL); // disable buffering
  my_pool.Dump();

  printf(new...\n);
  derived *d = new derived;

  printf(Got %p, sizeof=%u, raw dump follows:\n, d, (unsigned)sizeof(*d));
  unsigned * up = reinterpret_castunsigned *(d);
  const size_t size_in_unsigneds = sizeof(*d)/sizeof(unsigned);
  for (int ix=0; ix  size_in_unsigneds; ++ix) {
printf(  0x%08x = %d\n, up[ix], up[ix]);
  }
  my_pool.Dump();

  printf(delete...\n);
  delete d;

  my_pool.Dump();

  printf(The bug was not detected\n);
  return 0;
}

Environment:
System: Linux xba24 2.4.21-37.ELsmp #1 SMP Wed Sep 7 13:28:55 EDT 2005 i686
i686 i386 GNU/Linux
Architecture: i686


host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with:
/grid/sfi/ct_src/gcc-v4.1.2/platforms/linux86/matrix_bootstrap_000/gcc-4.1.2/configure
--prefix=/grid/common/pkgs/gcc/v4.1.2 --mandir=/grid/common/pkgs/gcc/v4.1.2/man
--infodir=/grid/common/pkgs/gcc/v4.1.2/info --enable-shared
--enable-threads=posix --disable-checking --with-system-zlib
--enable-__cxa_atexit --with-gnu-as
--with-as=/grid/common/pkgs/binutils/v2.17/bin/as --with-gnu-ld
--with-ld=/grid/common/pkgs/binutils/v2.17/bin/ld --disable-libgcj
--with-local-prefix=/grid/common/pkgs/gcc/v4.1.2 --enable-clocale=gnu
--with-gmp=/grid/common/pkgs/gmp/v4.1.4 --enable-languages=c,c++,objc,fortran


[Bug c/30148] New: parameter passing bug

2006-12-11 Thread gcc-bugzilla at gcc dot gnu dot org

The following code tests that values are passed correctly from a
call to a function. This fails, when the followign code is
compiled with -O2 and executed:

foo: foo.c:65: callee_b0f: Assertion `b14.b3 == b20.b3' failed.

The code below is automatically generated explicitly to test for
parameter-passing bugs. Since the pre-processed code below might be
hard to understand, here is the orginal code as well.

/* These macros are defined in Lua string Quest.header, which may be
 * re-defined from the quest command line or in file quest.lua. 
 */
#ifndef QUEST_FAILED
#include assert.h
#define QUEST_ASSERT(x) assert(x)
#else
#define QUEST_ASSERT(x) if (!(x)) failed(__LINE__)
#endif

#include stdarg.h

extern int printf(char *, ...);
static int errors = 0;
static void failed(int line)
{  printf(failed in %s: %d\n, __FILE__, line); errors++; }
static union bt7 { unsigned long int b10; double *b11; } b12 = {1989374529UL};
static
struct bt5 { unsigned int *b7; unsigned int b8; signed b9:10; } b17
= {(unsigned int *) 229073790U, 777271108U, 408};
static union bt6 {  } b18 = {};
static union bt0 {  } b13 = {};
static
struct bt3
{
float b3;
struct bt1 { short int b0; signed b1:2; } b4;
struct bt2 { float b2; } b5;
}
b14
= {10569.23, {17187, 1}, {45076.89}};
static union bt4 { double b6; } b15 = {92314.64};
static double b16 = 89201.46;
union bt7  callee_b0f(struct bt5 bp2, union bt6 bp3, ...)
{
va_list ap;
typedef union bt0 bd0;
typedef struct bt3 bd1;
typedef union bt4 bd2;
typedef double bd3;
bd0 b19;
bd1 b20;
bd2 b21;
bd3 b22;

/* seed: 4346181125667919790 */
va_start(ap, bp3);
QUEST_ASSERT(b17.b7 == bp2.b7);
QUEST_ASSERT(b17.b8 == bp2.b8);
QUEST_ASSERT(b17.b9 == bp2.b9);
b19 = va_arg(ap, bd0);
b20 = va_arg(ap, bd1);
b21 = va_arg(ap, bd2);
b22 = va_arg(ap, bd3);
QUEST_ASSERT(b14.b3 == b20.b3);
QUEST_ASSERT(b14.b4.b0 == b20.b4.b0);
QUEST_ASSERT(b14.b4.b1 == b20.b4.b1);
QUEST_ASSERT(b14.b5.b2 == b20.b5.b2);
QUEST_ASSERT(b15.b6 == b21.b6);
QUEST_ASSERT(b16 == b22);
va_end(ap);
return b12;
}
static void caller_b1f()
{
union bt7 b23; 
/* seed: 4346181125667919790 */
b23 = callee_b0f(b17, b18, b13, b14, b15, b16);
QUEST_ASSERT(b12.b10 == b23.b10);
}
int main(int argc, char **argv) {  caller_b1f(); return errors; }

Below is the pre-processed code:


# 1 foo.c
# 1 built-in
# 1 command line
# 1 foo.c
# 15 foo.c
# 1 /usr/include/assert.h 1 3 4
# 36 /usr/include/assert.h 3 4
# 1 /usr/include/features.h 1 3 4
# 308 /usr/include/features.h 3 4
# 1 /usr/include/sys/cdefs.h 1 3 4
# 309 /usr/include/features.h 2 3 4
# 331 /usr/include/features.h 3 4
# 1 /usr/include/gnu/stubs.h 1 3 4
# 332 /usr/include/features.h 2 3 4
# 37 /usr/include/assert.h 2 3 4
# 67 /usr/include/assert.h 3 4



extern void __assert_fail (__const char *__assertion, __const char *__file,
  unsigned int __line, __const char *__function)
 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));


extern void __assert_perror_fail (int __errnum, __const char *__file,
  unsigned int __line,
  __const char *__function)
 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));




extern void __assert (const char *__assertion, const char *__file, int __line)
 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));



# 16 foo.c 2





# 1 /usr/lib/gcc/x86_64-linux-gnu/4.1.2/include/stdarg.h 1 3 4
# 43 /usr/lib/gcc/x86_64-linux-gnu/4.1.2/include/stdarg.h 3 4
typedef __builtin_va_list __gnuc_va_list;
# 105 /usr/lib/gcc/x86_64-linux-gnu/4.1.2/include/stdarg.h 3 4
typedef __gnuc_va_list va_list;
# 22 foo.c 2

extern int printf(char *, ...);
static int errors = 0;
static void failed(int line)
{ printf(failed in %s: %d\n, foo.c, line); errors++; }
static union bt7 { unsigned long int b10; double *b11; } b12 = {1989374529UL};
static
struct bt5 { unsigned int *b7; unsigned int b8; signed b9:10; } b17
= {(unsigned int *) 229073790U, 777271108U, 408};
static union bt6 { } b18 = {};
static union bt0 { } b13 = {};
static
struct bt3
{
float b3;
struct bt1 { short int b0; signed b1:2; } b4;
struct bt2 { float b2; } b5;
}
b14
= {10569.23, {17187, 1}, {45076.89}};
static union bt4 { double b6; } b15 = {92314.64};
static double b16 = 89201.46;
union bt7 callee_b0f(struct bt5 bp2, union bt6 bp3, ...)
{
va_list ap;
typedef union bt0 bd0;
typedef struct bt3 bd1;
typedef union bt4 bd2;
typedef double bd3;
bd0 b19;
bd1 b20;
bd2 b21;
bd3 b22;


__builtin_va_start(ap,bp3);
((void) ((b17.b7 == bp2.b7) ? 0 : (__assert_fail (b17.b7 == bp2.b7,
foo.c, 58, __PRETTY_FUNCTION__), 0)));
((void) ((b17.b8 == bp2.b8) ? 0 : (__assert_fail (b17.b8 == bp2.b8,
foo.c, 59, __PRETTY_FUNCTION__), 0)));
((void) ((b17.b9 == bp2.b9) ? 0 : (__assert_fail (b17.b9 == 

[Bug java/30035] New: libjava cannot be built when objdir != srcdir

2006-11-30 Thread gcc-bugzilla at gcc dot gnu dot org

Installing GCC [1] explicitly encourages building the source code
with objdir separate from srcdir.

[1] http://gcc.gnu.org/install/configure.html

In particular:

mkdir objdir
cd objdir
srcdir/configure [options] [target]

Most of gcc builds fine that way except libjava, which fails to build
because:

 1. It does not attempt to create a sub directory for nor configure
libltdl at all.

 2. libjava/libltdl/config.sub assumes that ../../config.sub can be
found. The intention is to use srcdir/config.sub, but it cannot
be refered to this way when objdir != srcdir.

Environment:
System: SunOS types 5.7 Generic_106541-24 sun4u sparc SUNW,Ultra-250
Architecture: sun4


these are not relevant
host: sparc-sun-solaris2.7
build: sparc-sun-solaris2.7
target: sparc-sun-solaris2.7
configured with: ../gcc-4.1.1/configure --enable-languages=c,c++ --with-gnu-as
--with-gnu-ld --prefix=/cs/church-data/gcc

How-To-Repeat:
Build gcc with at least --enable-languages=java, in a separate objdir
than srcdir.


--- Comment #1 from liulk at types dot bu dot edu  2006-12-01 04:16 ---
Fix:
A Makefile target in libjava should be devised to configure libltdl
first, and the relative path should be fixed somehow.


-- 
   Summary: libjava cannot be built when objdir != srcdir
   Product: gcc
   Version: 4.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: liulk at types dot bu dot edu
 GCC build triplet: sparc-sun-solaris2.7
  GCC host triplet: sparc-sun-solaris2.7
GCC target triplet: sparc-sun-solaris2.7


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



[Bug c/29714] New: internal compiler error: in extract_insn, at recog.c:2084

2006-11-04 Thread gcc-bugzilla at gcc dot gnu dot org

../hercules/general2.c: In function 'z900_test_and_set':
../hercules/general2.c:1415: error: unrecognizable insn:
(insn 130 128 131 17 (set (reg:QI 102)
(const_int 255 [0xff])) -1 (nil)
(nil))
../hercules/general2.c:1415: internal compiler error: in
extract_insn, at recog.c:2084

Environment:
System: Linux herc-host 2.6.15-27-amd64-server #1 SMP Sat Sep 16 02:04:37 UTC
2006 x86_64 GNU/Linux
Architecture: x86_64


host: x86_64-pc-linux-gnu
build: x86_64-pc-linux-gnu
target: x86_64-pc-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
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --enable-checking=release
x86_64-linux-gnu

How-To-Repeat:
can I attach the preprocessor output using this script?


--- Comment #1 from phil dot sidler at attachmate dot com  2006-11-04 19:02 
---
Fix:
unknown


-- 
   Summary: internal compiler error: in extract_insn, at
recog.c:2084
   Product: gcc
   Version: 4.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: phil dot sidler at attachmate dot com
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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



[Bug other/29700] New: check requires autogen

2006-11-03 Thread gcc-bugzilla at gcc dot gnu dot org

Changed nothing in sources, build just from unpacked
`gcc-4.1.1.tar.bz2'.  Still tests try to run `autogen'.

make: Entering directory `gcc-4.1.1-rhysling'
make[1]: Entering directory `gcc-4.1.1-rhysling'
make[2]: Entering directory `gcc-4.1.1-rhysling/fastjar'
make[2]: Leaving directory `gcc-4.1.1-rhysling/fastjar'
make[2]: Entering directory `gcc-4.1.1-rhysling/fixincludes'
autogen -T ../../share/src/gcc-4.1.1/fixincludes/check.tpl
../../share/src/gcc-4.1.1/fixincludes/inclhack.def
make[2]: autogen: Command not found
make[2]: *** [check] Error 127

That this package is required to run tests is not even said in
INSTALL/test.html.  Neither http://gcc.gnu.org/install/test.html
says so.  If it indeed has to be required, this is documentation bug.

OTOH, that `check.sh' can not be generated once for all build
configurations, even some minimally featured backup version, also
seems strange.

Environment:
System: Linux 2.2.19-7.1.asp.2.gin #1 Tue Jun 15 16:42:13 MSD 2004 i686 unknown
Architecture: i686

Observed the same on sparc-sun-solaris.
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../share/src/gcc-4.1.1/configure --prefix=/home2/gin/usr1
--enable-languages=c,c++,java,objc --with-as=/home2/gin/usr/bin/as
--with-ld=/home2/gin/usr/bin/ld

How-To-Repeat:
make check


-- 
   Summary: check requires autogen
   Product: gcc
   Version: 4.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gin at mo dot msk dot ru
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug debug/29673] New: no -fdump-tree-inlined output

2006-10-31 Thread gcc-bugzilla at gcc dot gnu dot org

`-fdump-tree-inlined' creates no files.

Environment:
System: Linux  2.2.19-7.1.asp.2.gin #1 Tue Jun 15 16:42:13 MSD 2004 i686
unknown
Architecture: i686


host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../share/src/gcc-4.0.3/configure

How-To-Repeat:

List current directory.

Run with `-fdump-tree-inlined'.

List current directory.


-- 
   Summary: no -fdump-tree-inlined output
   Product: gcc
   Version: 4.0.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gin at mo dot msk dot ru
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug bootstrap/29620] New: can not build libgcc.a on stage 1

2006-10-27 Thread gcc-bugzilla at gcc dot gnu dot org


./xgcc -B./ \
# ...
-DL__gcc_bcmp  -c SHARED_DIR/gcc-4.1.1/gcc/libgcc2.c -o libgcc/./__gcc_bcmp.o
/var/tmp//ccBzKd2Z.s: Assembler messages:
/var/tmp//ccBzKd2Z.s:690: Error: misaligned data
make[3]: *** [libgcc/./_divdi3.o] Error 1

The same for targets:

libgcc/./_udivdi3.o
libgcc/./_umoddi3.o
libgcc/./_udivmoddi4.o
libgcc/./unwind-dw2.o
libgcc/./unwind-dw2-fde.o
libgcc/./gthr-gnat.o
libgcc/./unwind-c.o
libgcc/./_divdi3_s.o
libgcc/./_moddi3_s.o
libgcc/./_udivdi3_s.o
libgcc/./_umoddi3_s.o
libgcc/./_udivmoddi4_s.o
libgcc/./unwind-dw2_s.o
libgcc/./unwind-dw2-fde_s.o
libgcc/./gthr-gnat_s.o
libgcc/./unwind-c_s.o

Eventually

make[2]: *** [libgcc.a] Error 2
make[1]: *** [stage1_build] Error 2
make: *** [bootstrap] Error 2

Will post `xgcc' output for assembler or other details on request.

Environment:
System: SunOS redsun 5.5 Generic sun4m sparc SUNW,SPARCstation-10
Architecture: sun4

Old compiler is gcc (GCC) 4.0.2 installed with its own prefix.  The
only installed assembler is

GNU assembler version 2.7 (sparc-sun-solaris2.5), using BFD version 2.7

Worked with 4.0.2.  If too old for this one, please note so in `NEWS',
and tell which oldest binutils version should be used.

host: sparc-sun-solaris2.5
build: sparc-sun-solaris2.5
target: sparc-sun-solaris2.5
configured with: SHARED_DIR/gcc-4.1.1/configure --prefix=NEW_DIR --disable-nls
--disable-libgcj --enable-languages=c,c++,objc

How-To-Repeat:
make bootstrap


-- 
   Summary: can not build libgcc.a on stage 1
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gin at mo dot msk dot ru
 GCC build triplet: sparc-sun-solaris2.5
  GCC host triplet: sparc-sun-solaris2.5
GCC target triplet: sparc-sun-solaris2.5


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



[Bug bootstrap/29622] New: broken anchor name in html

2006-10-27 Thread gcc-bugzilla at gcc dot gnu dot org

`gcc-4.1.1/INSTALL/specific.html' specifies `#sparc-sun-solaris2' link
for `sparc-sun-solaris2*' item, but there is no such anchor in the
document.  Instead, this item is anchored with
`sparc_002dsun_002dsolaris2'.

How-To-Repeat:
Point browser to the file, try to follow the link in the document.


-- 
   Summary: broken anchor name in html
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gin at mo dot msk dot ru


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



[Bug target/29560] New: Poor optimization for character shifts on Atmel AVR

2006-10-23 Thread gcc-bugzilla at gcc dot gnu dot org

For setting individual bits of a register, the construct
unsigned char BitLocation = Whatever;
REG |= (1BitLocation); 
is commonly used. avr-gcc fails to realize that the target register
is only 8 bits wide and performs an unnecessary 16-Bit shift of 1.
Even if this code snippet is replaced by the following:
unsigned char BitLocation = Whatever;
const unsigned char one = 1;
REG |= (one  BitLocation);
The inefficient code will be generated, even with the -Os flag.
I suppose this is because the  operator is not defined for 8-bit
wide data types.

Environment:
System: Darwin variable.local 7.9.0 Darwin Kernel Version 7.9.0: Wed Mar 30
20:11:17 PST 2005; root:xnu/xnu-517.12.7.obj~1/RELEASE_PPC Power Macintosh
powerpc



host: powerpc-apple-darwin7.9.0
build: powerpc-apple-darwin7.9.0
target: avr-unknown-none
configured with: ../configure --target=avr --prefix=/usr/local/atmel
--enable-languages=c --disable-libssp --enable-__cxa_atexit
--enable-clocale=gnu --disable-nls : (reconfigured) ../configure --target=avr
--prefix=/usr/local/avr --enable-languages=c --disable-libssp
--enable-__cxa_atexit --enable-clocale=gnu --disable-nls

How-To-Repeat:
Use the following test program, compile with -Os -S to see assembler 
code generated by avr-gcc:
#include avr/io.h

void setpin(unsigned char pin, unsigned char val) {
if (val == 1) PORTC |= (1pin);
else PORTC = ~(1pin);
}

void setpin1(unsigned char pin, unsigned char val) {
const unsigned char one = 1;
if (val == 1) PORTC |= (onepin);
else PORTC = ~(onepin);
}

int main(void) {
setpin(3, 1);
setpin1(3, 1);
return 0;
}


--- Comment #1 from r dot leitgeb at x-pin dot com  2006-10-23 11:39 ---
Fix:
Define shift operators for 8 bit wide data types, use if possible.
I'm not a compiler expert but I know that the multiply operator
detects the data types involved, so it should be doable with the
shift operators as well.


-- 
   Summary: Poor optimization for character shifts on Atmel AVR
   Product: gcc
   Version: 4.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: r dot leitgeb at x-pin dot com
 GCC build triplet: powerpc-apple-darwin7.9.0
  GCC host triplet: powerpc-apple-darwin7.9.0
GCC target triplet: avr-unknown-none


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



[Bug fortran/29321] New: optional arguments+derived types = segmentation fault

2006-10-02 Thread gcc-bugzilla at gcc dot gnu dot org


Compilation of functions/subroutines with optional derived type arguments 
gives segmentation fault. 

a.F90: In function 'func':
a.F90:11: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://gcc.gnu.org/bugs.html for instructions.

If I remove one of the optional arguments (C in SUB)
in the sample code below it appears to work

Environment:
System: Linux olavs 2.6.8-2-686 #1 Thu May 19 17:53:30 JST 2005 i686 GNU/Linux
Architecture: i686


host: i386-pc-linux-gnu
build: i386-pc-linux-gnu
target: i386-pc-linux-gnu
configured with: ../gcc/configure
--prefix=/cosmic/coudert/tmp/gfortran-20060906/irun
--enable-languages=c,fortran --host=i386-linux
--with-gmp=/cosmic/coudert/tmp/gfortran-20060906/gfortran_libs

How-To-Repeat:

MODULE MYINT
   TYPE NUM
  INTEGER :: R = 0
   END TYPE NUM
   CONTAINS 
  FUNCTION FUNC(A,B) RESULT(E)
  IMPLICIT NONE
  TYPE(NUM)  A,B,E
  INTENT(IN) ::  A,B
  OPTIONAL B
  E%R=A%R
  CALL SUB(A,E)
  END FUNCTION FUNC

  SUBROUTINE SUB(A,E,B,C)
  IMPLICIT NONE
  TYPE(NUM) A,E,B,C
  INTENT(IN)   A,B
  INTENT(OUT)  E,C
  OPTIONAL B,C
  E%R=A%R
  END SUBROUTINE SUB
END MODULE MYINT


-- 
   Summary: optional arguments+derived types = segmentation fault
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vahtras at pdc dot kth dot se
 GCC build triplet: i386-pc-linux-gnu
  GCC host triplet: i386-pc-linux-gnu
GCC target triplet: i386-pc-linux-gnu


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



[Bug c/29309] New: Compiling an assembler-less file generates error from assembler

2006-10-01 Thread gcc-bugzilla at gcc dot gnu dot org

I'm trying to compile svgalib (http://www.svgalib.org/) on my
FreeBSD/amd64 system.

Although the package uses assembler in a few places, this can be
disabled with the -DNO_ASSEMBLY flag. After the pre-processor
there is no assembler code in the trouble-some C-file, except
for the (unused) definitions of bswap*, which come from system
headers (sys/endian.h).

Both, the system compiler (gcc-3.4.6) and the optional gcc41
give the same error:

{standard input}:30: Error: Incorrect register `%rax' used with `l' suffix

The line number differs depending on the compiler and the
optimization options, but the error is the same, and talks about
the same piece of the gcc-generated assembly:

[...]
#APP
outl %rax,%dx   ## -- here
#NO_APP
leave
ret
[...]

Environment:
System: FreeBSD aldan.algebra.com 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #1: Sat
Sep 30 16:33:20 EDT 2006 [EMAIL PROTECTED]:/meow/obj/var/src/sys/SILVER
amd64



host: x86_64-portbld-freebsd6.1
build: x86_64-portbld-freebsd6.1
target: x86_64-portbld-freebsd6.1
configured with: ./..//gcc-4.1-20060623/configure --disable-nls
--with-system-zlib --with-libiconv-prefix=/opt --program-suffix=41
--libdir=/opt/lib/gcc/x86_64-portbld-freebsd6.1/4.1.2
--with-gxx-include-dir=/opt/lib/gcc/x86_64-portbld-freebsd6.1/4.1.2/include/c++/
--infodir=/opt/info/gcc41 --disable-libgcj --prefix=/opt
x86_64-portbld-freebsd6.1

How-To-Repeat:

# 1 /var/ports/graphics/svgalib/work/svgalib-1.4.3/src/vgapci.c
# 1 built-in
# 1 command line
# 1 /var/ports/graphics/svgalib/work/svgalib-1.4.3/src/vgapci.c
# 1 /usr/include/stdio.h 1 3 4
# 43 /usr/include/stdio.h 3 4
# 1 /usr/include/sys/cdefs.h 1 3 4
# 44 /usr/include/stdio.h 2 3 4
# 1 /usr/include/sys/_null.h 1 3 4
# 45 /usr/include/stdio.h 2 3 4
# 1 /usr/include/sys/_types.h 1 3 4
# 33 /usr/include/sys/_types.h 3 4
# 1 /usr/include/machine/_types.h 1 3 4
# 51 /usr/include/machine/_types.h 3 4
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef long __int64_t;
typedef unsigned long __uint64_t;




typedef __int32_t __clock_t;
typedef unsigned int __cpumask_t;
typedef __int64_t __critical_t;
typedef double __double_t;
typedef double __float_t;
typedef __int64_t __intfptr_t;
typedef __int64_t __intmax_t;
typedef __int64_t __intptr_t;
typedef __int32_t __int_fast8_t;
typedef __int32_t __int_fast16_t;
typedef __int32_t __int_fast32_t;
typedef __int64_t __int_fast64_t;
typedef __int8_t __int_least8_t;
typedef __int16_t __int_least16_t;
typedef __int32_t __int_least32_t;
typedef __int64_t __int_least64_t;
typedef __int64_t __ptrdiff_t;
typedef __int64_t __register_t;
typedef __int64_t __segsz_t;
typedef __uint64_t __size_t;
typedef __int64_t __ssize_t;
typedef __int64_t __time_t;
typedef __uint64_t __uintfptr_t;
typedef __uint64_t __uintmax_t;
typedef __uint64_t __uintptr_t;
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
typedef __uint64_t __uint_fast64_t;
typedef __uint8_t __uint_least8_t;
typedef __uint16_t __uint_least16_t;
typedef __uint32_t __uint_least32_t;
typedef __uint64_t __uint_least64_t;
typedef __uint64_t __u_register_t;
typedef __uint64_t __vm_offset_t;
typedef __int64_t __vm_ooffset_t;
typedef __uint64_t __vm_paddr_t;
typedef __uint64_t __vm_pindex_t;
typedef __uint64_t __vm_size_t;





typedef __builtin_va_list __va_list;






typedef __va_list __gnuc_va_list;
# 34 /usr/include/sys/_types.h 2 3 4




typedef __uint32_t __blksize_t;
typedef __int64_t __blkcnt_t;
typedef __int32_t __clockid_t;
typedef __uint32_t __fflags_t;
typedef __uint64_t __fsblkcnt_t;
typedef __uint64_t __fsfilcnt_t;
typedef __uint32_t __gid_t;
typedef __int64_t __id_t;
typedef __uint32_t __ino_t;
typedef long __key_t;
typedef __int32_t __lwpid_t;
typedef __uint16_t __mode_t;
typedef int __nl_item;
typedef __uint16_t __nlink_t;
typedef __int64_t __off_t;
typedef __int32_t __pid_t;
typedef __int64_t __rlim_t;


typedef __uint8_t __sa_family_t;
typedef __uint32_t __socklen_t;
typedef long __suseconds_t;
typedef __int32_t __timer_t;
typedef __uint32_t __uid_t;
typedef unsigned int __useconds_t;
# 82 /usr/include/sys/_types.h 3 4
typedef int __ct_rune_t;
typedef __ct_rune_t __rune_t;
typedef __ct_rune_t __wchar_t;
typedef __ct_rune_t __wint_t;

typedef __uint32_t __dev_t;

typedef __uint32_t __fixpt_t;





typedef union {
 char __mbstate8[128];
 __int64_t _mbstateL;
} __mbstate_t;
# 46 /usr/include/stdio.h 2 3 4

typedef __off_t fpos_t;


typedef __size_t size_t;





typedef __va_list va_list;
# 70 /usr/include/stdio.h 3 4
struct __sbuf {
 unsigned char *_base;
 int _size;
};


struct __sFILEX;
# 102 /usr/include/stdio.h 3 4
typedef 

[Bug c/28814] New: ICE when compiling Stalin under 4.1 but not 4.0

2006-08-22 Thread gcc-bugzilla at gcc dot gnu dot org


Stalin is a Scheme compiler that generates C code. Stalin is itself written in
C and can compile itself. I am preparing a new release of Stalin for Debian
Etch. This release compiles with earlier versions of gcc, such as gcc-4.0, but
not with gcc-4.1. It gives an ICE.

The preprocessed source is huge. I submitted an earlier bug report that
included the preprocessed source but apparently the email bounced. I am
resubmitting making the preprocessed source available on the web instead.
I would appreciate if someone from GCC/GNU can let me know when you have
downloaded the preprocessed source so that I can remove it from my web site.

Environment:
System: Linux chino 2.6.15-1-k7-smp #2 SMP Mon Mar 6 15:50:26 UTC 2006 i686
GNU/Linux
Architecture: i686


I am submitting this from a different machine than that which generated the
error because the latter has no email connection. Both run Debian Etch on
identical hardware.
host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-linux-gnu
configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr
--disable-werror --with-tune=i686 --enable-checking=release i486-linux-gnu

How-To-Repeat:
[EMAIL PROTECTED]gcc -v -save-temps -o stalin -I./include -O3 
-fomit-frame-pointer
-fno-strict-aliasing -freg-struct-return stalin.c -L./include -lm -lgc
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,fortran,objc,obj-c++,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.1-1.4.2.0/jre --enable-mpfr
--with-tune=i686 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20060613 (prerelease) (Debian 4.1.1-5)
 /usr/lib/gcc/i486-linux-gnu/4.1.2/cc1 -E -quiet -v -I./include stalin.c
-mtune=i686 -fomit-frame-pointer -fno-strict-aliasing -freg-struct-return -O3
-fpch-preprocess -o stalin.i
ignoring nonexistent directory /usr/local/include/i486-linux-gnu
ignoring nonexistent directory
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../i486-linux-gnu/include
ignoring nonexistent directory /usr/include/i486-linux-gnu
#include ... search starts here:
#include ... search starts here:
 ./include
 /usr/local/include
 /usr/lib/gcc/i486-linux-gnu/4.1.2/include
 /usr/include
End of search list.
 /usr/lib/gcc/i486-linux-gnu/4.1.2/cc1 -fpreprocessed stalin.i -quiet -dumpbase
stalin.c -mtune=i686 -auxbase stalin -O3 -version -fomit-frame-pointer
-fno-strict-aliasing -freg-struct-return -o stalin.s
GNU C version 4.1.2 20060613 (prerelease) (Debian 4.1.1-5) (i486-linux-gnu)
   compiled by GNU C version 4.1.2 20060613 (prerelease) (Debian 4.1.1-5).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 3efbb0b5b3119ec825babd3e1cecb910
stalin.c: In function ‘f9226’:
stalin.c:369354: internal compiler error: in compare_values, at tree-vrp.c:415
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://gcc.gnu.org/bugs.html for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see URL:file:///usr/share/doc/gcc-4.1/README.Bugs.
Preprocessed source stored into /tmp/ccYcxZDO.out file, please attach this to
your bugreport.
395.851u 3.338s 6:39.21 99.9%  0+0k 0+0io 0pf+0w
[EMAIL PROTECTED]gcc-4.0 -v -save-temps -o stalin -I./include -O3
-fomit-frame-pointer -fno-strict-aliasing -freg-struct-return stalin.c
-L./include -lm -lgc
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr
--disable-werror --with-tune=i686 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.4 20060507 (prerelease) (Debian 4.0.3-3)
 /usr/lib/gcc/i486-linux-gnu/4.0.4/cc1 -E -quiet -v -I./include stalin.c
-mtune=i686 -fomit-frame-pointer -fno-strict-aliasing -freg-struct-return -O3
-fpch-preprocess -o stalin.i
ignoring nonexistent directory /usr/local/include/i486-linux-gnu
ignoring nonexistent directory /usr/include/i486-linux-gnu
#include ... search 

[Bug other/28700] New: does not fix broken linux/compiler-gcc+.h

2006-08-11 Thread gcc-bugzilla at gcc dot gnu dot org


System include file is broken as described in Fix section.
fixincludes does not create any modification of it, let alone fixed as
described.  Newly built gcc includes broken file when run.  This may
break just any program built with gcc, and does break compiling
`toplev.c' with `stage1/xgcc' as described in bug 28469.

Environment:
System: Linux way2go 2.6.3-27mdk #1 Tue May 31 21:48:42 MDT 2005 i686 unknown
unknown GNU/Linux
Architecture: i686

Old compiler is `gcc-3.3.2-6mdk'.  System headers are
`glibc-devel-2.3.3-12.8.100mdk'.
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../share/src/gcc-4.0.3/configure --enable-languages=c

How-To-Repeat:
make bootstrap


--- Comment #1 from gin at mo dot msk dot ru  2006-08-11 14:59 ---
Fix:
Currently not known.  Obviously any fixincludes bug (even lack of
fixincludes itself) may be worked around, by doing the necessary
include file editing manually.  (This is why severity is not
critical.)  In this case the workaround is as follows.

  Fix after `compiler-gcc3.h': reverse `#ifndef __KERNEL__'.  If user
  mode code with contains seemingly identical inline function
  definitions before and after this file, type of the 2nd one becomes
  different, which breaks compilation.

--- /usr/include/linux/compiler-gcc+.h  2006/08/10 21:55:37 1.1
+++ /usr/include/linux/compiler-gcc+.h  2006/08/10 22:02:12 1.2
@@ -6,11 +6,11 @@
  */
 #include linux/compiler-gcc.h

-#ifndef __KERNEL__
+#if defined __KERNEL__
 #define inline __inline__ __attribute__((always_inline))
 #define __inline__ __inline__ __attribute__((always_inline))
 #define __inline   __inline__ __attribute__((always_inline))
-#endif
+#endif /* defined __KERNEL__ */

 #define __deprecated   __attribute__((deprecated))
 #define __attribute_used__ __attribute__((__used__))

Hope this is enough data to patch fixincludes.  Its maintainers
certainly do not have to ask details of includes in my system from me
or other users.  All of them are in
ftp://mandrake.redbox.cz/Mandriva-old/updates/10.0/RPMS/glibc-devel-2.3.3-12.8.100mdk.i586.rpm
archive.  (Anyway, will be unable to check mail until aug 21.)


-- 
   Summary: does not fix broken linux/compiler-gcc+.h
   Product: gcc
   Version: 4.0.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gin at mo dot msk dot ru
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug bootstrap/28469] New: stage2 error: toplev.c redefines floor_log2

2006-07-24 Thread gcc-bugzilla at gcc dot gnu dot org


When executing `make bootstrap', the following error occurs.

stage1/xgcc -Bstage1/ -B/usr/local/i686-pc-linux-gnu/bin/   -O2 -g
-fomit-frame-pointer -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros
-Wold-style-definition -DHAVE_CONFIG_H -I. -I.
-I../../share/src/gcc-4.0.3/gcc -I../../share/src/gcc-4.0.3/gcc/.
-I../../share/src/gcc-4.0.3/gcc/../include
-I../../share/src/gcc-4.0.3/gcc/../libcpp/include \
  -DTARGET_NAME=\i686-pc-linux-gnu\ \
  -c ../../share/src/gcc-4.0.3/gcc/toplev.c -o toplev.o
../../share/src/gcc-4.0.3/gcc/toplev.c: In function 'toplev_main':
../../share/src/gcc-4.0.3/gcc/toplev.c:548: sorry, unimplemented: inlining
failed in call to 'floor_log2': redefined extern inline functions are not
considered for inlining
../../share/src/gcc-4.0.3/gcc/toplev.c:1713: sorry, unimplemented: called from
here
../../share/src/gcc-4.0.3/gcc/toplev.c:548: sorry, unimplemented: inlining
failed in call to 'floor_log2': redefined extern inline functions are not
considered for inlining
../../share/src/gcc-4.0.3/gcc/toplev.c:1717: sorry, unimplemented: called from
here
../../share/src/gcc-4.0.3/gcc/toplev.c:548: sorry, unimplemented: inlining
failed in call to 'floor_log2': redefined extern inline functions are not
considered for inlining
../../share/src/gcc-4.0.3/gcc/toplev.c:1719: sorry, unimplemented: called from
here
../../share/src/gcc-4.0.3/gcc/toplev.c:548: sorry, unimplemented: inlining
failed in call to 'floor_log2': redefined extern inline functions are not
considered for inlining
../../share/src/gcc-4.0.3/gcc/toplev.c:1723: sorry, unimplemented: called from
here
make[2]: *** [toplev.o] Error 1

Will post full preprocessed code on request.  It actually contains the
`floor_log2' declarations in order as follows.  Describing their line
numbers in the same way as preprocessor does.

# 168 ../../share/src/gcc-4.0.3/gcc/toplev.h
extern int floor_log2 (unsigned long);
# 183 ../../share/src/gcc-4.0.3/gcc/toplev.h
extern __inline__ __attribute__((always_inline)) __attribute__((always_inline))
int
floor_log2 (unsigned long x)
{
/* skipping */
# 546 ../../share/src/gcc-4.0.3/gcc/toplev.c
int
floor_log2 (unsigned long x)
{

Inline definition in `toplev.h' is not output by preprocessor with
older gcc versions, including that of old / stage 1 compiler.

Environment:
System: Linux way2go 2.6.3-27mdk #1 Tue May 31 21:48:42 MDT 2005 i686 unknown
unknown GNU/Linux
Architecture: i686

Old compiler is `gcc-3.3.2-6mdk'.  On stage 1 `GCC_VERSION' numeric
value is 3003.
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../share/src/gcc-4.0.3/configure --enable-languages=c

How-To-Repeat:
make bootstrap


-- 
   Summary: stage2 error: toplev.c redefines floor_log2
   Product: gcc
   Version: 4.0.3
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gin at mo dot msk dot ru
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug c/28470] New: does not inline constant funargs

2006-07-24 Thread gcc-bugzilla at gcc dot gnu dot org

Observing it at least on stage 1 compiler, and exactly the same way as
in 3.3.2.

If inline function, later called a functional, is passed a function
argument that is constant and inline, and said argument is called in
the functional body, and when inline expansions are on, compiler
expand inline only said functional, but not function argument calls in
said expansion.  Instead, it handles these calls just like those of
non- inline function, that is, outputs uninlined function body and
call instruction of that body, with all call overhead.

If argument is a nested function, 4.0.3 behaves a bit better than
3.3.2.  It does not output full trampoline code unnecessarily.

Priority?  How should I know?  Depends on projects using the compiler.

Environment:
System: Linux way2go 2.6.3-27mdk #1 Tue May 31 21:48:42 MDT 2005 i686 unknown
unknown GNU/Linux
Architecture: i686

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../share/src/gcc-4.0.3/configure --enable-languages=c

How-To-Repeat:
Compile with `-O99'.  `do_it_cb' code is output as a separate funtion,
and code output for `do_it_with_g_set_v0' calls `do_it_cb', not
`do_it'.

extern int g_set_v0 (void);
extern void g_restore_v (int);
extern void do_it (void);

static inline
with_g_set_v0 (void (f) (void))
{
  int v = g_set_v0 ();
  f ();
  g_restore_v (v);
}

static inline void
do_it_cb (void)
{
  do_it ();
}

void
do_it_with_g_set_v0 (void)
{
  with_g_set_v0 (do_it_cb);
}


-- 
   Summary: does not inline constant funargs
   Product: gcc
   Version: 4.0.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gin at mo dot msk dot ru
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug bootstrap/28472] New: -B$(build_tooldir)/bin/

2006-07-24 Thread gcc-bugzilla at gcc dot gnu dot org

Some targets in `gcc/Makefile.in' built while `make bootstrap' specify
`-B$(build_tooldir)/bin/'.  All of this is done when nothing from gcc
being built is installed in that directory yet.  What is installed
there, if any, generally has nothing to do with gcc at all.  It may
easily be files from older compiler version.  Using them may do only
harm.

In this gcc version this is exactly the same in all build
configurations on and for all systems.  Detailed system description is
irrelevant, leaving it empty.

Environment:
System: 
Architecture: 
host:
build:
target:
configured with:

How-To-Repeat:
make bootstrap


--- Comment #1 from gin at mo dot msk dot ru  2006-07-24 18:01 ---
Fix:
If in some build configurations bootstrap compiler must use some
external software and find it though additional `-B' option, need a
cleaner way to specify list of such `-B' options for these
configurations.  And leave it empty by default.


-- 
   Summary: -B$(build_tooldir)/bin/
   Product: gcc
   Version: 4.0.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gin at mo dot msk dot ru


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



[Bug c/28368] New:

2006-07-13 Thread gcc-bugzilla at gcc dot gnu dot org

-std=c89 doesn't warn about gcc's ?: extension

Environment:
System: Linux rho 2.6.15-1-amd64-k8 #2 Tue Mar 7 06:53:26 UTC 2006 x86_64
GNU/Linux
Architecture: x86_64


host: x86_64-unknown-linux-gnu
build: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu
configured with: /mirror/d/gcc/configure --disable-nls
--prefix=/p/p/gcc-2006-06-29.18h54 --disable-multilib --enable-languages=c

How-To-Repeat:

For example, I expected this to fail:

  echo 'int main() { return 3 ?: 1; }'  k.c
  gcc -W -Wall -std=c89 k.c

With --pedantic, I do get a warning:

  $ gcc --pedantic -std=c89 k.c
  k.c: In function 'main':
  k.c:1: warning: ISO C forbids omitting the middle term of a ?: expression

I suppose that using -std=c99 should evoke a warning, too.


-- 
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jim at meyering dot net
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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



[Bug libstdc++/28344] New: [4.2 Regression] Use of __alpha in tr1/random breaks Tru64 UNIX bootstrap

2006-07-11 Thread gcc-bugzilla at gcc dot gnu dot org

libstdc++ fails to bootstrap on Tru64 UNIX as of 20060710:

/vol/gccsrc/obj/gcc-4.2.0-20060710/4.0f-gcc/./gcc/xgcc -shared-libgcc
-B/vol/gccsrc/obj/gcc-4.2.0-20060710/4.0f-gcc/./gcc -nostdinc++
-L/vol/gccsrc/obj/gcc-4.2.0-20060710/4.0f-gcc/alpha-dec-osf4.0f/libstdc++-v3/src
-L/vol/gccsrc/obj/gcc-4.2.0-20060710/4.0f-gcc/alpha-dec-osf4.0f/libstdc++-v3/src/.libs
-B/vol/gcc/share/alpha-dec-osf4.0f/bin/ -B/vol/gcc/share/alpha-dec-osf4.0f/lib/
-isystem /vol/gcc/share/alpha-dec-osf4.0f/include -isystem
/vol/gcc/share/alpha-dec-osf4.0f/sys-include -Winvalid-pch -Wno-deprecated -x
c++-header -g -O2  -mieee
-I/vol/gccsrc/obj/gcc-4.2.0-20060710/4.0f-gcc/alpha-dec-osf4.0f/libstdc++-v3/include/alpha-dec-osf4.0f
-I/vol/gccsrc/obj/gcc-4.2.0-20060710/4.0f-gcc/alpha-dec-osf4.0f/libstdc++-v3/include
-I/vol/gccsrc/src/gcc/libstdc++-v3/libsupc++ -O2 -g
/vol/gccsrc/src/gcc/libstdc++-v3/include/precompiled/stdtr1c++.h -o
alpha-dec-osf4.0f/bits/stdtr1c++.h.gch/O2g.gch
/vol/gccsrc/src/gcc/libstdc++-v3/include/precompiled/stdtr1c++.h:30:25:
warning:
/vol/gccsrc/obj/gcc-4.2.0-20060710/4.0f-gcc/alpha-dec-osf4.0f/libstdc++-v3/include/alpha-dec-osf4.0f/bits/stdc++.h.gch/O0g.gch:
not used because `__NO_INLINE__' not defined
/vol/gccsrc/obj/gcc-4.2.0-20060710/4.0f-gcc/alpha-dec-osf4.0f/libstdc++-v3/include/tr1/random:1983:
error: expected ',' or '...' before numeric constant

This happens because tr1/random uses __alpha

  templatetypename _RealType
class gamma_distribution
{
[...]
  explicit
  gamma_distribution(const result_type __alpha = result_type(1))
  : _M_alpha(__alpha)

which is predefined as 1 on Tru64 UNIX (and probably other alpha systems).

This was introduced by this patch:

2006-07-06  Paolo Carlini  [EMAIL PROTECTED]

* include/tr1/random (class gamma_distribution): Add.

Environment:
System: OSF1 haydn V4.0 1229 alpha
Machine: alpha

host: alpha-dec-osf4.0f
build: alpha-dec-osf4.0f
target: alpha-dec-osf4.0f
configured with: /vol/gcc/src/gcc/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf4.0f --build
alpha-dec-osf4.0f --target alpha-dec-osf4.0f
--with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap

How-To-Repeat:
Bootstrap as described above.


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2006-07-11 
15:29 ---
Fix:
This patch works around this issue:

Index: libstdc++-v3/include/tr1/random
===
--- libstdc++-v3/include/tr1/random (revision 115313)
+++ libstdc++-v3/include/tr1/random (working copy)
@@ -46,6 +46,8 @@
 #include tr1/type_traits
 #include fstream

+#undef __alpha
+
 namespace std
 {
 _GLIBCXX_BEGIN_NAMESPACE(tr1)


-- 
   Summary: [4.2 Regression] Use of __alpha in tr1/random breaks
Tru64 UNIX bootstrap
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf4.0f
  GCC host triplet: alpha-dec-osf4.0f
GCC target triplet: alpha-dec-osf4.0f


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



[Bug target/28307] New: [4.1/4.2 Regression] pthread functions in libgcc not weak any more on Tru64 UNIX

2006-07-07 Thread gcc-bugzilla at gcc dot gnu dot org

While investigating the root cause of PR libgcj/28189, I noticed that both
on the 4.1 branch and on mainline (where the libjava testsuite timeouts
occur) the boehm-gc test had started failing as well (which easily goes
unnoticed due to PR boehm-gc/11412): gctest fails like this:

Key creation failed 18446744073709551615
Test failed
FAIL: gctest

It turns out that this happens when pthread_key_create returns -1.
Printing errno at this point reveals that errno is 0, which is unexpected
and shouldn't happen with the function from libpthread.

Upon further investigation, it turned out that the pthread function
definitions from gthr-posix.c aren't marked weak any more, so the dummy
function definitions make it into libgcc.a and libgcc_s.so.1, which of
course every usage of the real pthread functions.  This was introduce by
this patch and it's successors:

2005-11-09  Alexandre Oliva  [EMAIL PROTECTED]

PR other/4372
* gthr-dce.h, gthr-posix.h, gthr-posix95.h, gthr-solaris.h,
gthr-tpf.h: Define __gthrw.  For all identifiers that might
be weak, introduce weakrefs or non-weak aliases with __gthrw,
and prefix all uses with __ghtrw.

Before that change, there were #pragma weak declarations for all functions
defined in gthr-posix.c, so those definitions became weak.  Afterwards,
those declarations were lost and the definitions became strong.

Environment:
System: OSF1 bartok V5.1 2650 alpha
Machine: alpha

host: alpha-dec-osf5.1b
build: alpha-dec-osf5.1b
target: alpha-dec-osf5.1b
configured with: /vol/gcc/src/gcc/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf5.1b --build
alpha-dec-osf5.1b --target alpha-dec-osf5.1b
--with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap

How-To-Repeat:
Investigate e.g. the pthread_key_create definition in libgcc.a and
libgcc_s.so.1 with stdump:

On the 4.0 branch, it is marked weak:

6. (file  0) (0x10) pthread_key_create Proc   Text   symref (indexNil) 
(weakext)

while on mainline and the 4.1 branch this is lost:

6. (file  0) (0x10) pthread_key_create Proc   Text   symref (indexNil)


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2006-07-07 
17:06 ---
Fix:
I'm currently testing the following patch (which is difficult due to lots
of other unrelated breakage on mainline ;-).  It probably needs some
cleanup and comments, but gives the basic idea.

Index: gthr-posix.c
===
--- gthr-posix.c(revision 115230)
+++ gthr-posix.c(working copy)
@@ -28,6 +28,7 @@ Software Foundation, 51 Franklin Street,

 #include tconfig.h
 #include tm.h
+# define __gthrw_pragma(pragma) _Pragma (#pragma)
 /* Define so we provide weak definitions of functions used by libobjc only. 
*/
 #define _LIBOBJC_WEAK
 #include gthr.h
Index: gthr-posix.h
===
--- gthr-posix.h(revision 115230)
+++ gthr-posix.h(working copy)
@@ -59,8 +59,12 @@ typedef pthread_mutex_t __gthread_recurs
 #endif

 #if SUPPORTS_WEAK  GTHREAD_USE_WEAK
+# ifndef __gthrw_pragma
+#  define __gthrw_pragma(pragma)
+# endif
 # define __gthrw2(name,name2,type) \
-  static __typeof(type) name __attribute__ ((__weakref__(#name2)));
+  static __typeof(type) name __attribute__ ((__weakref__(#name2))); \
+  __gthrw_pragma(weak name2)
 # define __gthrw_(name) __gthrw_ ## name
 #else
 # define __gthrw2(name,name2,type)


-- 
   Summary: [4.1/4.2 Regression] pthread functions in libgcc not
weak any more on Tru64 UNIX
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf5.1b
  GCC host triplet: alpha-dec-osf5.1b
GCC target triplet: alpha-dec-osf5.1b


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



[Bug target/28285] New: [4.2 Regression] duplicate case value in alpha_swapped_comparison operator

2006-07-06 Thread gcc-bugzilla at gcc dot gnu dot org

Bootstrapping current mainline on Tru64 UNIX fails in stage1 as of 20060705:

gcc -c   -g -fkeep-inline-functions -DIN_GCC   -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-Wmissing-format-attribute -fno-common   -DHAVE_CONFIG_H -I. -I.
-I/vol/gcc/src/gcc/gcc -I/vol/gcc/src/gcc/gcc/.
-I/vol/gcc/src/gcc/gcc/../include -I/vol/gcc/src/gcc/gcc/../libcpp/include
-I/vol/gnu/obj/gmp-4.1.3/mpfr -I/vol/gnu/obj/gmp-4.1.3
-I/vol/gcc/src/gcc/gcc/../libdecnumber -I../libdecnumberinsn-preds.c -o
insn-preds.o
/vol/gcc/src/gcc/gcc/config/alpha/predicates.md: In function
`alpha_swapped_comparison_operator':
/vol/gcc/src/gcc/gcc/config/alpha/predicates.md:571: error: duplicate case
value
/vol/gcc/src/gcc/gcc/config/alpha/predicates.md:570: error: previously used
here
make[3]: *** [insn-preds.o] Error 1

Inspecting the generated insn-preds.c (alpha_swapped_comparison_operator),
there are indeed two case GTU entries.

Environment:
System: OSF1 bartok V5.1 2650 alpha
Machine: alpha

host: alpha-dec-osf5.1b
build: alpha-dec-osf5.1b
target: alpha-dec-osf5.1b
configured with: /vol/gcc/src/gcc/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf5.1b --build
alpha-dec-osf5.1b --target alpha-dec-osf5.1b
--with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap

How-To-Repeat:
Bootstrap mainline as above.


-- 
   Summary: [4.2 Regression] duplicate case value in
alpha_swapped_comparison operator
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf5.1b
  GCC host triplet: alpha-dec-osf5.1b
GCC target triplet: alpha-dec-osf5.1b


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



[Bug libstdc++/28290] New: [4.2 Regression] ICE during extc++.h pch generation on Tru64 UNIX V5.1B

2006-07-06 Thread gcc-bugzilla at gcc dot gnu dot org

Bootstrapping current mainline as of 20060705 fails on Tru64 UNIX V5.1B
when trying to genererate the PCH file for extc++.h:

/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/./gcc/xgcc -shared-libgcc
-B/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/./gcc -nostdinc++
-L/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/src
-L/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/src/.libs
-B/vol/gcc/share/alpha-dec-osf5.1b/bin/ -B/vol/gcc/share/alpha-dec-osf5.1b/lib/
-isystem /vol/gcc/share/alpha-dec-osf5.1b/include -isystem
/vol/gcc/share/alpha-dec-osf5.1b/sys-include -Winvalid-pch -Wno-deprecated -x
c++-header -g -O2  -mieee
-I/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/alpha-dec-osf5.1b
-I/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include
-I/vol/gccsrc/src/gcc/libstdc++-v3/libsupc++
/vol/gccsrc/src/gcc/libstdc++-v3/include/precompiled/extc++.h -O2 -g -o
./alpha-dec-osf5.1b/bits/extc++.h.gch/O2g.gch; 
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:57:
error: 'iconv_t' does not name a type
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:67:
error: 'descriptor_type' does not name a type
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:70:
error: 'descriptor_type' does not name a type
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:147:
error: ISO C++ forbids declaration of 'descriptor_type' with no type
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:147:
error: expected ';' before '' token
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:151:
error: expected `;' before 'const'
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:151:
error: ISO C++ forbids declaration of 'descriptor_type' with no type
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:151:
error: expected ';' before '' token
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:155:
error: expected `;' before 'protected'
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:
In constructor '__gnu_cxx::encoding_state::encoding_state()':
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:86:
error: class '__gnu_cxx::encoding_state' does not have any field named
'_M_in_desc'
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:86:
error: class '__gnu_cxx::encoding_state' does not have any field named
'_M_out_desc'
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:
In constructor '__gnu_cxx::encoding_state::encoding_state(const char*, const
char*, int, int, int)':
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:92:
error: class '__gnu_cxx::encoding_state' does not have any field named
'_M_in_desc'
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:92:
error: class '__gnu_cxx::encoding_state' does not have any field named
'_M_out_desc'
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:
In copy constructor '__gnu_cxx::encoding_state::encoding_state(const
__gnu_cxx::encoding_state)':
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:104:
error: class '__gnu_cxx::encoding_state' does not have any field named
'_M_in_desc'
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:104:
error: class '__gnu_cxx::encoding_state' does not have any field named
'_M_out_desc'
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:
In member function 'bool __gnu_cxx::encoding_state::good() const':
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:121:
error: 'descriptor_type' does not name a type
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:122:
error: '_M_in_desc' was not declared in this scope
/vol/gccsrc/obj/gcc-4.2.0-20060705/5.1b-gcc/alpha-dec-osf5.1b/libstdc++-v3/include/ext/codecvt_specializations.h:122:
error: '__err' was not declared in this scope

[Bug libgomp/28296] New: libgomp fails to configure on Tru64 UNIX

2006-07-06 Thread gcc-bugzilla at gcc dot gnu dot org

libgomp just doesn't configure any more on Tru64 UNIX V5.1B:

configure: error: Pthreads are required to build libgomp

This is due to the last configure.ac change:

2006-07-05  Eric Christopher  [EMAIL PROTECTED]

* configure.ac: Depend addition of -pthread on host OS.
* configure: Regenerate.

which list the -pthread flag during the compile test, so both pthread tests
fail now:

configure:8315:  /vol/gcc/obj/gcc-4.2.0-20060705/5.1b-gcc/./gcc/xgcc
-B/vol/gcc/obj/gcc-4.2.0-20060705/5.1b-gcc/./gcc/
-B/vol/gcc/share/alpha-dec-osf5.1b/bin/ -B/vol/gcc/share/alpha-dec-osf5.1b/lib/
-isystem /vol/gcc/share/alpha-dec-osf5.1b/include -isystem
/vol/gcc/share/alpha-dec-osf5.1b/sys-include -o conftest -O2 -g -O2  -mieee  
conftest.c  5
In file included from conftest.c:25:
/vol/gcc/obj/gcc-4.2.0-20060705/5.1b-gcc/./gcc/include/pthread.h:339:4: error:
#error Please compile the module including pthread.h with -pthread

Before that patch, -pthread was included and the test succeeded.

I think this tweaking of pthread detection in libgomp must stop: this
introduces problems all over the place.  I suppose there are some tested
autoconf macros to achieve this correctly on all platforms.

Environment:
System: OSF1 bartok V5.1 2650 alpha
Machine: alpha

host: alpha-dec-osf5.1b
build: alpha-dec-osf5.1b
target: alpha-dec-osf5.1b
configured with: /vol/gcc/src/gcc/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf5.1b --build
alpha-dec-osf5.1b --target alpha-dec-osf5.1b
--with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap

How-To-Repeat:
Bootstrap mainline as described above.


-- 
   Summary: libgomp fails to configure on Tru64 UNIX
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgomp
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf5.1b
  GCC host triplet: alpha-dec-osf5.1b
GCC target triplet: alpha-dec-osf5.1b


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



[Bug c/28233] New: internal compiler error: in make_decl_rtl, at varasm.c:752

2006-07-03 Thread gcc-bugzilla at gcc dot gnu dot org

An array of 64K labels triggers the error.

Environment:
System: FreeBSD FreeBSD.jphartmann.net 6.1-RELEASE FreeBSD 6.1-RELEASE
#1: Sat Jun 17 11:51:42 CEST 2006
[EMAIL PROTECTED]:/usr/src/sys/i386/compile/KERNEL i386


machine, os, target, libraries (multiple lines)
host: i386-unknown-freebsd6.1
build: i386-unknown-freebsd6.1
target: i386-unknown-freebsd6.1
configured with: ../gcc-4.1.1/configure --prefix=/home/john --with-cpu=i686

How-To-Repeat:
There is no preprocessor statements in the failing program.
f/home/john/src/testing:make ts.s
cc -S -fverbose-asm -finline -Winline -Wall -O2 -fno-unroll-loops
-fno-unroll-all-loops -g -o ts.s ts.c
ts.c: In function `main':
ts.c:17: warning: unused variable `ic'
ts.c:22: internal compiler error: in make_decl_rtl, at varasm.c:752
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://gcc.gnu.org/bugs.html for instructions.
gmake: *** [ts.s] Error 1
f/home/john/src/testing:gcc --version
gcc (GCC) 4.1.1
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


--- Comment #1 from jphartmann at gmail dot com  2006-07-03 12:05 ---
Fix:
No known circumvention.  I tried switch statements, but they
run the compiler out of storage after a while.  Apologies for
generating this by hand.  My system i mail-challenged.


-- 
   Summary: internal compiler error: in make_decl_rtl, at
varasm.c:752
   Product: gcc
   Version: 4.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jphartmann at gmail dot com
 GCC build triplet: i386-unknown-freebsd6.1
  GCC host triplet: i386-unknown-freebsd6.1
GCC target triplet: i386-unknown-freebsd6.1


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



[Bug libgcj/28189] New: [4.1/4.2 Regression] Many libjava execution tests time out on Tru64 UNIX

2006-06-28 Thread gcc-bugzilla at gcc dot gnu dot org

Between 20050805 and 20060208, many libjava execution tests started to time
out on Tru64 UNIX (both V4.0F and V5.1B), as can be seen comparing the
following test results:

http://gcc.gnu.org/ml/gcc-testresults/2005-08/msg00708.html
http://gcc.gnu.org/ml/gcc-testresults/2006-02/msg00899.html

While the current 4.0 branch is fine

http://gcc.gnu.org/ml/gcc-testresults/2006-06/msg01353.html

both the 4.1 branch and mainline still suffer from the problem:

http://gcc.gnu.org/ml/gcc-testresults/2006-06/msg00817.html
http://gcc.gnu.org/ml/gcc-testresults/2006-06/msg00818.html

This is a serious regression and can cause testing to take about 5 days.

Environment:
System: OSF1 bartok V5.1 2650 alpha
Machine: alpha

host: alpha-dec-osf5.1b
build: alpha-dec-osf5.1b
target: alpha-dec-osf5.1b
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf5.1b --build
alpha-dec-osf5.1b --target alpha-dec-osf5.1b
--with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap

How-To-Repeat:
Bootstrap and test as described above.


-- 
   Summary: [4.1/4.2 Regression] Many libjava execution tests time
out on Tru64 UNIX
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf5.1b
  GCC host triplet: alpha-dec-osf5.1b
GCC target triplet: alpha-dec-osf5.1b


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



[Bug libgcj/28190] New: [4.2 Regression] libjava bootstrap failure on IRIX 6.5: stdint.h misdetection

2006-06-28 Thread gcc-bugzilla at gcc dot gnu dot org

Since at least 20060503, libjava fails to bootstrap on IRIX 6.5.28:

/vol/gccsrc/obj/gcc-4.2.0-20060616/6.5-gcc-java/./gcc/xgcc -shared-libgcc
-B/vol/gccsrc/obj/gcc-4.2.0-20060616/6.5-gcc-java/./gcc -nostdinc++
-L/vol/gccsrc/obj/gcc-4.2.0-20060616/6.5-gcc-java/mips-sgi-irix6.5/32/libstdc++-v3/src
-L/vol/gccsrc/obj/gcc-4.2.0-20060616/6.5-gcc-java/mips-sgi-irix6.5/32/libstdc++-v3/src/.libs
-B/vol/gcc/mips-sgi-irix6.5/bin/ -B/vol/gcc/mips-sgi-irix6.5/lib/ -isystem
/vol/gcc/mips-sgi-irix6.5/include -isystem
/vol/gcc/mips-sgi-irix6.5/sys-include -mabi=32 -DHAVE_CONFIG_H -I.
-I/vol/gcc/src/gcc-dist/libjava -I./include -I./gcj
-I/vol/gcc/src/gcc-dist/libjava -Iinclude
-I/vol/gcc/src/gcc-dist/libjava/include
-I/vol/gcc/src/gcc-dist/libjava/classpath/include -Iclasspath/include
-I/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm
-I/vol/gcc/src/gcc-dist/libjava/../boehm-gc/include -I../boehm-gc/include
-I/vol/gcc/src/gcc-dist/libjava/libltdl -I/vol/gcc/src/gcc-dist/libjava/libltdl
-I/vol/gcc/src/gcc-dist/libjava/.././libjava/../gcc -I/vol/gcc/src/g!
 cc-dist/libjava/../zlib -I/vol/gcc/src/gcc-dist/libjava/../libffi/include
-I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers
-Wswitch-enum -D_FILE_OFFSET_BITS=64 -I/vol/X11/include -Wextra -Wall
-D_GNU_SOURCE -DPREFIX=\/vol/gcc\ -DLIBDIR=\/vol/gcc/lib\
-DJAVA_HOME=\/vol/gcc\
-DBOOT_CLASS_PATH=\/vol/gcc/share/java/libgcj-4.2.0.jar\
-DJAVA_EXT_DIRS=\/vol/gcc/share/java/ext\
-DGCJ_ENDORSED_DIRS=\/vol/gcc/share/java/gcj-endorsed\
-DGCJ_VERSIONED_LIBDIR=\/vol/gcc/lib/gcj-4.2.0\ -DPATH_SEPARATOR=\:\
-DLIBGCJ_DEFAULT_DATABASE=\/vol/gcc/lib/../lib/gcj-4.2.0/classmap.db\
-DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL=\gcj-4.2.0/classmap.db\
-DTOOLEXECLIBDIR=\/vol/gcc/lib/../lib\ -g -O2 -mabi=32 -MT
java/lang/natDouble.lo -MD -MP -MF java/lang/.deps/natDouble.Tpo -c
/vol/gcc/src/gcc-dist/libjava/java/lang/natDouble.cc   -DPIC -o
java/lang/.libs/natDouble.o
In file included from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/mprec.h:33,
 from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/fdlibm.h:29,
 from /vol/gcc/src/gcc-dist/libjava/java/lang/natDouble.cc:26:
classpath/include/config-int.h:327:1: warning: INT8_MIN redefined
In file included from /usr/include/inttypes.h:242,
 from classpath/include/config-int.h:23,
 from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/mprec.h:33,
 from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/fdlibm.h:29,
 from /vol/gcc/src/gcc-dist/libjava/java/lang/natDouble.cc:26:
/usr/include/stdint.h:64:1: warning: this is the location of the previous
definition
In file included from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/mprec.h:33,
 from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/fdlibm.h:29,
 from /vol/gcc/src/gcc-dist/libjava/java/lang/natDouble.cc:26:
classpath/include/config-int.h:328:1: warning: INT16_MIN redefined
In file included from /usr/include/inttypes.h:242,
 from classpath/include/config-int.h:23,
 from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/mprec.h:33,
 from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/fdlibm.h:29,
 from /vol/gcc/src/gcc-dist/libjava/java/lang/natDouble.cc:26:
/usr/include/stdint.h:65:1: warning: this is the location of the previous
definition
In file included from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/mprec.h:33,
 from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/fdlibm.h:29,
 from /vol/gcc/src/gcc-dist/libjava/java/lang/natDouble.cc:26:
classpath/include/config-int.h:329:1: warning: INT32_MIN redefined
In file included from /usr/include/inttypes.h:242,
 from classpath/include/config-int.h:23,
 from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/mprec.h:33,
 from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/fdlibm.h:29,
 from /vol/gcc/src/gcc-dist/libjava/java/lang/natDouble.cc:26:
/usr/include/stdint.h:66:1: warning: this is the location of the previous
definition
In file included from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/mprec.h:33,
 from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/fdlibm.h:29,
 from /vol/gcc/src/gcc-dist/libjava/java/lang/natDouble.cc:26:
classpath/include/config-int.h:330:1: warning: INT64_MIN redefined
In file included from /usr/include/inttypes.h:242,
 from classpath/include/config-int.h:23,
 from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/mprec.h:33,
 from
/vol/gcc/src/gcc-dist/libjava/classpath/native/fdlibm/fdlibm.h:29,
 from /vol/gcc/src/gcc-dist/libjava/java/lang/natDouble.cc:26:
/usr/include/stdint.h:67:1: warning: this is the location of 

[Bug boehm-gc/27963] New: [4.2 Regression] libjava fails to build if it isn't built by default

2006-06-08 Thread gcc-bugzilla at gcc dot gnu dot org

Trying to bootstrap mainline on IRIX 6.5 with java included failed since
boehm-gc (which is required for libjava) isn't built:

In file included from /vol/gcc/src/gcc-dist/libjava/include/jvm.h:25,
 from /vol/gcc/src/gcc-dist/libjava/include/java-interp.h:14,
 from /vol/gcc/src/gcc-dist/libjava/defineclass.cc:23:
./include/java-gc.h:30:53: error: gc_ext_config.h: No such file or directory

This happens due to this change:

2006-06-06  David Ayers  [EMAIL PROTECTED]

PR libobjc/13946
* Makefile.def: Add dependencies for libobjc which boehm-gc.
* Makefile.in: Regenerate.
* configure.in: Add --enable-objc-gc at toplevel and have it
enable boehm-gc for Objective-C.
Remove target-boehm-gc from libgcj.
Add target-boehm-gc to target_libraries.
Add target-boehm-gc to noconfigdirs where ${libgcj}
is specified.

On platforms (like IRIX 6), where libjava just isn't built *by default*,
unconditionally adding boehm-gc to noconfigdirs inhibits building boehm-gc
completely, though it could build and is required for libjava.

This is a regression from the 4.1 branch.

Environment:
System: IRIX64 columba 6.5 07010238 IP27



host: mips-sgi-irix6.5
build: mips-sgi-irix6.5
target: mips-sgi-irix6.5
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --with-gnu-as
--with-as=/vol/gcc/lib/gas-2.16.1 --enable-libgcj
--with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap

How-To-Repeat:
Bootstrap mainline as described.


-- 
   Summary: [4.2 Regression] libjava fails to build if it isn't
built by default
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: boehm-gc
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: mips-sgi-irix6.5
  GCC host triplet: mips-sgi-irix6.5
GCC target triplet: mips-sgi-irix6.5


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



[Bug libstdc++/27931] New: valgrind reports memleak when std::ios:sync_with_stdio(false)

2006-06-07 Thread gcc-bugzilla at gcc dot gnu dot org

A memory leak happens when  std::ios::sync_with_stdio(false);
valgrind:
...
==13644==
==13644== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 17 from 1)
==13644== malloc/free: in use at exit: 122,880 bytes in 6 blocks.
==13644== malloc/free: 6 allocs, 0 frees, 122,880 bytes allocated.
==13644== For counts of detected errors, rerun with: -v
==13644== searching for pointers to 6 not-freed blocks.
==13644== checked 96,388 bytes.
==13644==
==13644== 24,576 bytes in 3 blocks are still reachable in loss record 1 of 2
==13644==at 0x401BCC9: operator new[](unsigned) (vg_replace_malloc.c:197)
==13644==by 0x4090D7B: std::basic_filebufchar, std::char_traitschar
::_M_allocate_internal_buffer() (in 
/usr/lib/libstdc++.so.6.0.8)
==13644==by 0x4098805: (within /usr/lib/libstdc++.so.6.0.8)
==13644==by 0x40862D6: std::ios_base::sync_with_stdio(bool) (in
/usr/lib/libstdc++.so.6.0.8)
==13644==by 0x8048712: main (in ...)
==13644==
==13644==
==13644== 98,304 bytes in 3 blocks are still reachable in loss record 2 of 2
==13644==at 0x401BCC9: operator new[](unsigned) (vg_replace_malloc.c:197)
==13644==by 0x4090D2E: std::basic_filebufwchar_t,
std::char_traitswchar_t ::_M_allocate_internal_buffer() (in 
/usr/lib/libstdc++.so.6.0.8)
==13644==by 0x40981F5: (within /usr/lib/libstdc++.so.6.0.8)
==13644==by 0x40863B4: std::ios_base::sync_with_stdio(bool) (in
/usr/lib/libstdc++.so.6.0.8)
==13644==by 0x8048712: main (in ...)
==13644==
==13644== LEAK SUMMARY:
==13644==definitely lost: 0 bytes in 0 blocks.
==13644==  possibly lost: 0 bytes in 0 blocks.
==13644==still reachable: 122,880 bytes in 6 blocks.
==13644== suppressed: 0 bytes in 0 blocks.

Environment:
System: Linux penelope 2.6.15-1-k7 #2 Mon Mar 6 15:42:39 UTC 2006 i686
GNU/Linux
Architecture: i686


host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-linux-gnu
configured with: ../src/configure -v
--enable-languages=c,c++,java,fortran,objc,obj-c++,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.1-1.4.2.0/jre --enable-mpfr
--with-tune=i686 --enable-checking=release i486-linux-gnu

How-To-Repeat:
// run with valgrind --leak-check=full --show-reachable=yes 
#include iostream
int 
main(void)
{
  std::ios::sync_with_stdio(false);
  std::cout  testing  std::endl;
  return 0;
}


--- Comment #1 from mirko dot maischberger at gmail dot com  2006-06-07 
14:40 ---
Fix:
std::ios::sync_with_stdio(true);


-- 
   Summary: valgrind reports memleak when
std::ios:sync_with_stdio(false)
   Product: gcc
   Version: 4.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mirko dot maischberger at gmail dot com
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


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



[Bug ada/27936] New: gnatbind fails to link on Tru64 UNIX

2006-06-07 Thread gcc-bugzilla at gcc dot gnu dot org

Bootstrapping current mainline with Ada included fails on Tru64 UNIX V5.1B
when linking gnatbind:

/vol/gccsrc/obj/gcc-4.2.0-20060606/5.1b-gcc/./prev-gcc/xgcc
-B/vol/gccsrc/obj/gcc-4.2.0-20060606/5.1b-gcc/./prev-gcc/
-B/vol/gcc/alpha-dec-osf5.1b/bin/   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition
-Wmissing-format-attribute -Werror -fno-common   -DHAVE_CONFIG_H  -o gnatbind
ada/b_gnatb.o ada/adaint.o ada/argv.o ada/exit.o ada/cio.o ada/cstreams.o
ada/env.o ada/final.o ada/init.o ada/initialize.o ada/seh_init.o ada/link.o
ada/targext.o ada/raise.o ada/tracebak.o ada/a-except.o ada/ada.o
ada/a-elchha.o ada/ali-util.o ada/ali.o ada/alloc.o ada/atree.o ada/bcheck.o
ada/binde.o ada/binderr.o ada/bindgen.o ada/bindusg.o ada/butil.o ada/casing.o
ada/csets.o ada/debug.o ada/einfo.o ada/elists.o ada/err_vars.o ada/errout.o
ada/erroutc.o ada/fmap.o ada/fname.o ada/g-hesora.o ada/g-htable.o
ada/g-os_lib.o ada/g-string.o ada/g-utf_32.o ada/gnat.o ada/gnat!
 bind.o ada/gnatvsn.o ada/hostparm.o ada/interfac.o ada/lib.o ada/namet.o
ada/nlists.o ada/opt.o ada/osint-b.o ada/osint.o ada/output.o ada/rident.o
ada/s-addope.o ada/s-assert.o ada/s-carun8.o ada/s-casuti.o ada/s-crc32.o
ada/s-crtl.o ada/s-exctab.o ada/s-htable.o ada/s-imgenu.o ada/s-mastop.o
ada/s-memory.o ada/s-parame.o ada/s-secsta.o ada/s-soflin.o ada/s-sopco3.o
ada/s-sopco4.o ada/s-sopco5.o ada/s-stache.o ada/s-stalib.o ada/s-stoele.o
ada/s-strops.o ada/s-traceb.o ada/s-traent.o ada/s-unstyp.o ada/s-wchcnv.o
ada/s-wchcon.o ada/s-wchjis.o ada/scng.o ada/scans.o ada/sdefault.o ada/sinfo.o
ada/sinput.o ada/sinput-c.o ada/snames.o ada/stand.o ada/stringt.o
ada/switch-b.o ada/switch.o ada/style.o ada/styleg.o ada/stylesw.o ada/system.o
ada/table.o ada/targparm.o ada/tree_io.o ada/types.o ada/uintp.o ada/uname.o
ada/urealp.o ada/widechar.o prefix.o version.o \
 ../libcpp/libcpp.a  -liconv ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a -lexc 
system__pure_exceptions___elabs
system__pure_exceptions_E
collect2: ld returned 1 exit status
make[3]: *** [gnatbind] Error 1

This happens since at least 20060503.

With nm, I find that those symbols are referenced in b_gnat[1b].o, but
defined in s-purexc.o which isn't linked:

b_gnat1.o

system__pure_exceptions_E|  | U | 
system__pure_exceptions___elabs  |  | U | 

b_gnatb.o

system__pure_exceptions_E|  | U | 
system__pure_exceptions___elabs  |  | U | 

s-purexc.o

$system__pure_exceptions___elabs..ng |  | N | 
system__pure_exceptions_E| 0004 | C | 
system__pure_exceptions___elabs  | 0016 | T | 0008

Environment:
System: OSF1 bartok V5.1 2650 alpha
Machine: alpha

host: alpha-dec-osf5.1b
build: alpha-dec-osf5.1b
target: alpha-dec-osf5.1b
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf5.1b --build
alpha-dec-osf5.1b --target alpha-dec-osf5.1b
--with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap

How-To-Repeat:
Bootstrap mainline as described above.


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2006-06-07 
18:02 ---
Fix:
Add ada/s-purexc.o to ada/Make-lang.in (GNATBIND_OBJS).

If this is considered the correct fix, I'll submit a proper patch.


-- 
   Summary: gnatbind fails to link on Tru64 UNIX
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf5.1b
  GCC host triplet: alpha-dec-osf5.1b
GCC target triplet: alpha-dec-osf5.1b


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



[Bug ada/27937] New: [4.2 Regression] Ada bootstrap failure on Solaris 10/x86

2006-06-07 Thread gcc-bugzilla at gcc dot gnu dot org

Bootstrapping mainline on Solaris 10/x86 (configured for
i686-pc-solaris2.10 to work around the still unfixed PR target/26146) fails
compiling several Ada files:

/vol/gccsrc/obj/gcc-4.2.0-20060606/10-gcc-gas-amd64/./gcc/xgcc
-B/vol/gccsrc/obj/gcc-4.2.0-20060606/10-gcc-gas-amd64/./gcc/
-B/vol/gcc/i686-pc-solaris2.10/bin/ -B/vol/gcc/i686-pc-solaris2.10/lib/
-isystem /vol/gcc/i686-pc-solaris2.10/include -isystem
/vol/gcc/i686-pc-solaris2.10/sys-include -c -g -O2 -fPIC  -W -Wall -gnatpg 
a-stwifi.adb -o a-stwifi.o
virtual memory exhausted: Not enough space

If one observes the compilation with top, one can see that VM usage grows
to 4 GB before gnat1 dies.  Compiling with -O instead works.

This is a regression from the 4.1 branch.

Environment:
System: SunOS afrika 5.10 Generic_Patch i86pc i386 i86pc
Architecture: i86pc


host: i686-pc-solaris2.10
build: i686-pc-solaris2.10
target: i686-pc-solaris2.10
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --with-gnu-as
--with-as=/usr/sfw/bin/gas --with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,objc,ada --host i686-pc-solaris2.10 --build
i686-pc-solaris2.10 --target i686-pc-solaris2.10 --disable-libmudflap

How-To-Repeat:
Bootstrap mainline as described above.


-- 
   Summary: [4.2 Regression] Ada bootstrap failure on Solaris 10/x86
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: i686-pc-solaris2.10
  GCC host triplet: i686-pc-solaris2.10
GCC target triplet: i686-pc-solaris2.10


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



[Bug c++/27813] New: ICE while building a public released package from source

2006-05-29 Thread gcc-bugzilla at gcc dot gnu dot org

I was trying to install the amule-2.0.3-r4 package from source in my gentoo
linux.
The package is public so if it could be a package error it should be reported
on their web site, but it is not.
I send this bug directly to you gcc-team, without interesting the gentoo
forums, cause it is reproducible just with preprocessed source.
Download attachment with precompiled source from:
http://82.57.174.182/pub/gcc-bug-attachment.tbz2

Environment:
System: Linux localhost 2.6.14-hardened-r8 #5 Sun May 21 19:37:30 Local time
zone must be set--see zic manu i586 AMD-K6(tm) 3D processor GNU/Linux
Architecture: i586
AMD-K6(tm) 3D 400 MHz processor
128 MB RAM
Host bridge: VIA Technologies, Inc. VT82C598 [Apollo MVP3] (rev 04)

host: i586-pc-linux-gnu
build: i586-pc-linux-gnu
target: i586-pc-linux-gnu
configured with: /var/tmp/portage/gcc-3.4.5-r1/work/gcc-3.4.5/configure
--prefix=/usr --bindir=/usr/i586-pc-linux-gnu/gcc-bin/3.4.5
--includedir=/usr/lib/gcc/i586-pc-linux-gnu/3.4.5/include
--datadir=/usr/share/gcc-data/i586-pc-linux-gnu/3.4.5
--mandir=/usr/share/gcc-data/i586-pc-linux-gnu/3.4.5/man
--infodir=/usr/share/gcc-data/i586-pc-linux-gnu/3.4.5/info
--with-gxx-include-dir=/usr/lib/gcc/i586-pc-linux-gnu/3.4.5/include/g++-v3
--host=i586-pc-linux-gnu --build=i586-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --disable-multilib
--disable-libgcj --enable-languages=c,c++,f77 --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu

How-To-Repeat:
$ gcc preprocessed-source.cpp
In file included from /usr/include/wx-2.6/wx/event.h:27,
 from /usr/include/wx-2.6/wx/app.h:20,
 from amule.h:38,
 from ECSpecialTags.cpp:40:
ECSpecialTags.h: In member function `void CValueMap::CreateTag(ec_tagname_t,
CMD4Hash, CECTag*)':
ECSpecialTags.h:115: internal compiler error: in sweep_string_variable, at
protector.c:1158
Please submit a full bug report,
with preprocessed source if appropriate.


--- Comment #1 from exio82 at gmail dot com  2006-05-29 22:55 ---
Fix:
Don't ask me :-)


-- 
   Summary: ICE while building a public released package from source
   Product: gcc
   Version: 3.4.5
Status: UNCONFIRMED
  Severity: critical
  Priority: P2
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: exio82 at gmail dot com
 GCC build triplet: i586-pc-linux-gnu
  GCC host triplet: i586-pc-linux-gnu
GCC target triplet: i586-pc-linux-gnu


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



[Bug target/27540] New: libgomp fails to configure on IRIX 5.3

2006-05-10 Thread gcc-bugzilla at gcc dot gnu dot org

Current mainline fails to bootstrap on IRIX 5.3:

configure: error: Pthreads are required to build libgomp
make[1]: *** [configure-target-libgomp] Error 1

Environment:
System: IRIX lyra 5.3 11091812 IP22 mips



host: mips-sgi-irix5.3
build: mips-sgi-irix5.3
target: mips-sgi-irix5.3
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --with-gnu-as
--with-as=/vol/gcc/lib/gas-2.15 --with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,objc,ada --disable-libmudflap

How-To-Repeat:
Try to bootstrap on IRIX 5.3.


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2006-05-10 
21:22 ---
Fix:
Since IRIX 5 doesn't have libpthread (and never will), libgomp should only
be enable for *-*-irix6* in toplevel configure.in.  I'll propose a patch
shortly.  Strictly speaking, libpthread was only introduced in patches to
IRIX 6.2, but older IRIX 6.[012] systems are probably completely gone by
now and can thus be ignored.


-- 
   Summary: libgomp fails to configure on IRIX 5.3
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: mips-sgi-irix5.3
  GCC host triplet: mips-sgi-irix5.3
GCC target triplet: mips-sgi-irix5.3


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



[Bug c++/27369] New: tree check ICE when attribute externally_visible used

2006-05-01 Thread gcc-bugzilla at gcc dot gnu dot org

When compiling a C++ program (for the AVR target) that defines interrupt
vectors using the externally_visible attribute, I get this ICE message:

avrlib/bits/atmega128_usart.cpp:20: internal compiler error: tree check:
expected tree that contains 'decl minimal' structure, have 'omp_atomic'  in
eq_node, at cgraph.c:175

Environment:
System: Darwin Neds-Mini.local 8.6.0 Darwin Kernel Version 8.6.0: Tue Mar 7
16:58:48 PST 2006; root:xnu-792.6.70.obj~1/RELEASE_PPC Power Macintosh powerpc
host: powerpc-apple-darwin8.6.0
build: powerpc-apple-darwin8.6.0
target: avr-unknown-none
configured with:
/opt/local/var/db/dports/build/_Users_ned_src_darwinports_dports_cross_avr-gcc/work/gcc-4.2-20060429/configure
--prefix=/opt/local --infodir=/opt/local/share/info
--mandir=/opt/local/share/man --target=avr --program-prefix=avr-
--with-included-gettext --enable-obsolete
--with-gxx-include-dir=/opt/local/avr/include/c++/4.2-20060429/
--disable-libssp --enable-languages=c,c++

How-To-Repeat:

Compile the attached hw.ii file with:

avr-g++ -fno-exceptions -funsigned-char -funsigned-bitfields -fpack-struct
-fshort-enums -ggdb -O2 -Wall -Wextra -Wshadow -mmcu=atmega128 -xc++ -c -o hw.o
hw.ii


--- Comment #1 from ned at bike-nomad dot com  2006-05-01 14:38 ---
Fix:

Remove the externally_visible attributes on the vector definitions (lines 1998
to 2020) 
in attached file hw.ii and recompile:

sed -e '1998,2020s/, externally_visible//' hw.ii  hwgood.cpp

avr-g++ -fno-exceptions -funsigned-char -funsigned-bitfields -fpack-struct
-fshort-enums -ggdb -O2 -Wall -Wextra -Wshadow -mmcu=atmega128 -xc++ -c -o
hwgood.o hwgood.cpp


-- 
   Summary: tree check ICE when attribute externally_visible used
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ned at bike-nomad dot com
 GCC build triplet: powerpc-apple-darwin8.6.0
  GCC host triplet: powerpc-apple-darwin8.6.0
GCC target triplet: avr-unknown-none


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



[Bug other/27348] New: memcmp reads past end of strings

2006-04-28 Thread gcc-bugzilla at gcc dot gnu dot org


If you use memcmp to compare strings, it does not stop reading when it
finds the terminating null byte of the shortest string, which can
trigger an attempt to read unallocated memory.  I'd recommend
replacing instances of memcmp on strings with strncmp, which won't
attempt to read past the end of the shortest string.

Environment:
System: Linux puffer.diveadx.com 2.6.16-1.2069_FC4smp #1 SMP Tue Mar 28
12:47:32 EST 2006 i686 i686 i386 GNU/Linux
Architecture: i686


host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /src/latest/trunk/src/gcc/configure -v
--prefix=/opt/local/latest/trunk --enable-languages=c,c++
--cache-file=.././config.cache --srcdir=/src/latest/trunk/src/gcc

How-To-Repeat:

As an example, build gengtype with mudflap and run it.  It will
detect lots of reads by memcmp past the end of a string.


--- Comment #1 from fnf at specifix dot com  2006-04-28 11:53 ---
Fix:

Heres an example fix for gengtype.c

Index: gengtype.c
===
RCS file: /cvsroots/latest/src/gcc/gcc/gengtype.c,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 gengtype.c
--- gengtype.c  15 Mar 2006 20:17:05 -  1.1.1.4
+++ gengtype.c  28 Apr 2006 10:48:11 -
@@ -1179,7 +1179,7 @@
   size_t i;
   for (i = 1; i  NUM_BASE_FILES; i++)
if ((size_t)(slashpos - basename) == strlen (lang_dir_names [i])
-memcmp (basename, lang_dir_names[i], strlen (lang_dir_names[i]))
== 0)
+strncmp (basename, lang_dir_names[i], strlen
(lang_dir_names[i])) == 0)
   {
 /* It's in a language directory, set that language.  */
 bitmap = 1  i;
@@ -1272,7 +1272,7 @@
   size_t i;

   for (i = 0; i  NUM_BASE_FILES; i++)
-   if (memcmp (basename, lang_dir_names[i], strlen (lang_dir_names[i])) ==
0
+   if (strncmp (basename, lang_dir_names[i], strlen (lang_dir_names[i]))
== 0
 basename[strlen(lang_dir_names[i])] == '/')
  return base_files[i];


-- 
   Summary: memcmp reads past end of strings
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fnf at specifix dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug c/27289] New: Gcc produces spurious -Wuninitialized warning compiling gdb

2006-04-24 Thread gcc-bugzilla at gcc dot gnu dot org


When building gdb with -Werror, the compile fails due to what looks
like a spurious warning from using -Wuninitialized.  I've reduced the
testcase down to a minimal one, hopefully preserving the original
cause of the warning.

Environment:
System: Linux puffer.diveadx.com 2.6.16-1.2069_FC4smp #1 SMP Tue Mar 28
12:47:32 EST 2006 i686 i686 i386 GNU/Linux
Architecture: i686

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /src/latest/trunk/src/gcc/configure -v
--prefix=/opt/local/latest/trunk --enable-languages=c,c++
--cache-file=.././config.cache --srcdir=/src/latest/trunk/src/gcc

How-To-Repeat:

/* Run as:

 $ gcc -c -O2 -Wuninitialized bug.c
 bug.c: In function ‘foo’:
 bug.c:19: warning: ‘tmp_obstack.chunk_size’ may be used uninitialized
in this function
*/

struct obstack
{
  long chunk_size;
};

static struct obstack dont_print_statmem_obstack;

void
foo (int dont_print_statmem, int start)
{
  int i;
  struct obstack tmp_obstack;

  if (dont_print_statmem == 0)
{
  tmp_obstack = dont_print_statmem_obstack;
}

  for (i = start; i  7; i++)
{
}

  if (dont_print_statmem == 0)
{
  dont_print_statmem_obstack = tmp_obstack;
}
}


-- 
   Summary: Gcc produces spurious -Wuninitialized warning compiling
gdb
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fnf at specifix dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug pending/27092] New: Compiling a special asm-statment will fail if -O1 -fgcse is set.

2006-04-09 Thread gcc-bugzilla at gcc dot gnu dot org
NOTE: Defaulting component because reported component no longer exists
When compile with gcc-3.4 -O1 -fgcse -c -o qemu-bug.o qemu-bug.c,
there will be the error:

[EMAIL PROTECTED]:~/src/qemu-bug$ gcc-3.4 -O1 -fgcse -c -o qemu-bug.o qemu-bug.c
qemu-bug.c: In function `main':
qemu-bug.c:2: error: inconsistent operand constraints in an `asm'
qemu-bug.c:2: error: inconsistent operand constraints in an `asm'

Without -fgcse, there will no error, -O2 -fno-gcse does work as well.

Environment:
System: Linux Pegasos 2.6.16 #3 PREEMPT Sat Apr 8 18:28:12 CEST 2006 ppc
GNU/Linux
Architecture: ppc


host: powerpc-unknown-linux-gnu
build: powerpc-unknown-linux-gnu
target: powerpc-unknown-linux-gnu
configured with: ../src/configure -v --enable-languages=c,c++,f77,pascal
--prefix=/usr --libexecdir=/usr/lib --with-gxx-include-dir=/usr/include/c++/3.4
--enable-shared --with-system-zlib --enable-nls --without-included-gettext
--program-suffix=-3.4 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --disable-softfloat
--enable-targets=powerpc-linux,powerpc64-linux --with-cpu=default32
--disable-softfloat powerpc-linux-gnu

How-To-Repeat:
# 1 qemu-bug.c
# 1 built-in
# 1 command line
# 1 qemu-bug.c
inline void stl(void *ptr, int v) {
__asm__ __volatile__ (stwbrx %1,0,%2 : =m (*(unsigned long *)ptr) : r
(v), r (ptr));
}

int main () {
  unsigned long *sp, *u_platform;
  char *k_platform;



  stl(sp, (unsigned long)(0)); stl(sp+1, (unsigned long)(0));;

  if (k_platform)
stl(sp, (unsigned long)(15)); stl(sp+1, (unsigned long)((unsigned long)
u_platform));;
  return 0;
}


-- 
   Summary: Compiling a special asm-statment will fail if -O1 -fgcse
is set.
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: pending
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: didischuster at arcor dot de
 GCC build triplet: powerpc-unknown-linux-gnu
  GCC host triplet: powerpc-unknown-linux-gnu
GCC target triplet: powerpc-unknown-linux-gnu


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



[Bug c++/27015] New: strange warning when init std::tr1::array

2006-04-03 Thread gcc-bugzilla at gcc dot gnu dot org


when compile following file[1] with option `-Wall', it will give a
warning[2]. g++-4.0 do not has this problem. I don't think this
warning is proper.

[1]
// begin array2.cpp
#include tr1/array

int main() {
  std::tr1::arrayint, 2 foo = {0, 1};
  return foo[1];
}
// end

[2]
array2.cpp: In function 'int main()':
array2.cpp:4: warning: missing braces around initializer for 'int [2]'

Environment:
System: Linux ldblab 2.6.16-1-686-smp #1 SMP Tue Mar 28 15:54:35 UTC
2006 i686 GNU/Linux
Architecture: i686


host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-linux-gnu
configured with: ../src/configure -v
--enable-languages=c,c++,java,fortran,objc,obj-c++,ada,treelang
--prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.1-1.4.2.0/jre
--enable-mpfr --with-tune=i686 --enable-checking=release
i486-linux-gnu

How-To-Repeat:
  array.ii.bz2 is in attachment, uncompress it. then use
  'g++-4.1 -Wall -c array.ii' to reproduce this bug.


--- Comment #1 from lidaobing at gmail dot com  2006-04-04 05:41 ---
Fix:
  work around, the following code will not generate warning with
  '-Wall', but it looks strange.

// begin
#include tr1/array

int main() {
  std::tr1::arrayint, 2 foo = {{0, 1}};
  return foo[1];
}
//end


--
LI Daobing


-- 
   Summary: strange warning when init std::tr1::array
   Product: gcc
   Version: 4.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: lidaobing at gmail dot com
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


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



[Bug c++/26882] New: ICE when using template function with memory attributes

2006-03-26 Thread gcc-bugzilla at gcc dot gnu dot org


This program (which has no included files) causes an ICE and a bus error:

--

typedef unsigned char uint8_t ;
typedef unsigned short uint16_t ;
typedef unsigned long uint32_t ;

#define PROGMEM __attribute__((__progmem__))

templatetypename T
T PROGMEM * rom(const T init)
{
static T PROGMEM t = init;
return t;
}

struct funny
{
uint8_t a;
uint16_t b;
uint32_t c;
};

uint8_t PROGMEM *rom1 = rom((uint8_t)123);

funny f = { 0xBB, 0x, 0x };
funny PROGMEM *rom2 = rom(f);

int main()
{
*((volatile uint8_t*)0x55) = *rom1;
*((volatile uint8_t*)0xAA) = rom2-a;
}

bool __cxa_guard_acquire(uint8_t *gv) { return true; }
bool __cxa_guard_release(uint8_t *gv) { return true; }

--

Environment:
System: Darwin Neds-Mini.local 8.5.0 Darwin Kernel Version 8.5.0: Sun Jan 22
10:38:46 PST 2006; root:xnu-792.6.61.obj~1/RELEASE_PPC Power Macintosh powerpc



host: powerpc-apple-darwin8.5.0
build: powerpc-apple-darwin8.5.0
target: avr-unknown-none
configured with:
/opt/local/var/db/dports/build/_Users_ned_src_darwinports_dports_cross_avr-gcc/work/gcc-4.0.2/configure
--prefix=/opt/local --infodir=/opt/local/share/info
--mandir=/opt/local/share/man --target=avr --program-prefix=avr-
--with-included-gettext --enable-obsolete
--with-gxx-include-dir=/opt/local/avr/include/c++/4.0.2/
--enable-languages=c,c++

How-To-Repeat:

Compile the above program. I used the command line:

avr-g++ -mmcu=atmega128 -c -o romtest2.o romtest2.cpp

and got this:

romtest2.cpp: In function 'T* rom(const T) [with T = uint8_t]':
romtest2.cpp|21| instantiated from here
romtest2.cpp|10| internal compiler error: Bus error


-- 
   Summary: ICE when using template function with memory attributes
   Product: gcc
   Version: 4.0.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ned at bike-nomad dot com
 GCC build triplet: powerpc-apple-darwin8.5.0
  GCC host triplet: powerpc-apple-darwin8.5.0
GCC target triplet: avr-unknown-none


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



[Bug bootstrap/26679] New: boostrap failure due to warning in gcc/varasm.c

2006-03-14 Thread gcc-bugzilla at gcc dot gnu dot org

During bootstrap line 3072 of varasm.c generates a warning that
shift = width of type, and the build dies due to -Werror.
This diagnosis is correct but the shift is unreachable.

Environment:
System: Linux dps 2.6.15 #2 PREEMPT Sat Jan 7 17:47:27 GMT 2006 i686 GNU/Linux
Architecture: i686
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --prefix=/usr --enable-shared
--cache-file=config.cache

How-To-Repeat:
bootstrap with HOST_WIDE_INT intendical to unsinged int (e.g.
almost any 32 bit x86 box).


--- Comment #1 from dps at simpson dot demon dot co dot uk  2006-03-14 
14:24 ---
Fix:
This patch uses reprocessor logic to elinminate the (harmless,
without -Werrror, warning. 
--- gcc/varasm.c.dist   2006-03-08 11:53:25.0 +
+++ gcc/varasm.c2006-03-14 14:12:15.0 +
@@ -3067,11 +3067,16 @@
int i;

h ^= (hashval_t) hwi;
+#if HOST_BITS_PER_WIDE_INT != SIZEOF_UNSIGNED_INT * CHAR_BIT
+   /* Leaving this in emits a warning, so stop compilation, if n=1 */
for (i = 1; i  n; ++i)
  {
hwi = shift;
h ^= (hashval_t) hwi;
  }
+#else
+   i=shift; i=n; /* Squash compiler warnings */
+#endif
   }
   break;

--- gcc/configure.ac.dist   2006-03-08 11:53:25.0 +
+++ gcc/configure.ac2006-03-14 02:37:17.0 +
@@ -289,6 +289,7 @@
 AC_CHECK_SIZEOF(void *)
 AC_CHECK_SIZEOF(short)
 AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(unsigned int)
 AC_CHECK_SIZEOF(long)
 AC_CHECK_TYPES([long long], [AC_CHECK_SIZEOF(long long)])
 AC_CHECK_TYPES([__int64], [AC_CHECK_SIZEOF(__int64)])
--- gcc/config.in.dist  2006-03-08 11:53:25.0 +
+++ gcc/config.in   2006-03-14 02:41:09.0 +
@@ -1240,6 +1240,11 @@
 #undef SIZEOF_INT
 #endif

+/* The size of a `usigned int` as computed by sizeof. */
+#ifndef USED_FOR_TARGET
+#undef SIZEOF_UNSIGNED_INT
+#endif
+

 /* The size of a `long', as computed by sizeof. */
 #ifndef USED_FOR_TARGET


-- 
   Summary: boostrap failure due to warning in gcc/varasm.c
   Product: gcc
   Version: 2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dps at simpson dot demon dot co dot uk
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug c++/26417] New: typeid(typeid(*object)) ICE on g++ 3.x / i686

2006-02-22 Thread gcc-bugzilla at gcc dot gnu dot org


The code below generates a compiler ICE with g++ 3.3 (debian stable),
g++ 3.4 (debian testing):

[pollindd] ~ g++-3.3 -c ice-typeid.cc

   1036
ice-typeid.cc: In function `int bug5(BaseB*)':
ice-typeid.cc:43: internal compiler error: in expand_expr, at expr.c:8833
Please submit a full bug ...

[pollindd] ~ g++-3.4 -c ice-typeid.cc

   1037
ice-typeid.cc: In function `int bug5(BaseB*)':
ice-typeid.cc:43: internal compiler error: in expand_expr_real, at
expr.c:8469
Please submit a full bug report...

It works well with g++ 2.95.4 (debian). Maybe related to bug #25357.

Environment:
System: Linux pollindd 2.6.15.2-adeos #2 PREEMPT Wed Feb 15 12:00:00 CET
2006 i686 GNU/Linux
Architecture: i686

host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-linux-gnu
configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--libexecdir=/usr/lib --with-gxx-include-dir=/usr/include/c++/3.4
--enable-shared --with-system-zlib --enable-nls
--without-included-gettext --program-suffix=-3.4 --enable-__cxa_atexit
--enable-libstdcxx-allocator=mt --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk
--disable-werror i486-linux

How-To-Repeat:

Initial source code (5 bugs included: play with -DBUG=x option to
activate them):


#include typeinfo

class BaseB
{
public:
  virtual ~BaseB() {}
};

#if BUG == 1

const char* bug1(BaseB const* o)
{
  return typeid(typeid(*o)).name();
}

#elif BUG == 2

const std::type_info  bug2(BaseB const* o)
{
  return typeid(typeid(*o));
}

#elif BUG == 3

const char* bug3(BaseB * o)
{
  return typeid(typeid(*o)).name();
}

#elif BUG == 4

const std::type_info  bug4(BaseB * o)
{
  return typeid(typeid(*o));
}

#else

int bug5(BaseB * o)
{
  int i;
  return (typeid(typeid(*o)) == typeid(i));
}

#endif



Output from g++ 3.3 -E :

# 1 ice-typeid.cc
# 1 built-in
# 1 command line
# 1 ice-typeid.cc

# 1 /usr/include/c++/3.3/typeinfo 1 3
# 38 /usr/include/c++/3.3/typeinfo 3
# 1 /usr/include/c++/3.3/exception 1 3
# 40 /usr/include/c++/3.3/exception 3
extern C++ {

namespace std
{
# 52 /usr/include/c++/3.3/exception 3
  class exception
  {
  public:
exception() throw() { }
virtual ~exception() throw();


virtual const char* what() const throw();
  };



  class bad_exception : public exception
  {
  public:
bad_exception() throw() { }


virtual ~bad_exception() throw();
  };


  typedef void (*terminate_handler) ();

  typedef void (*unexpected_handler) ();


  terminate_handler set_terminate(terminate_handler) throw();


  void terminate() __attribute__ ((__noreturn__));


  unexpected_handler set_unexpected(unexpected_handler) throw();


  void unexpected() __attribute__ ((__noreturn__));
# 100 /usr/include/c++/3.3/exception 3
  bool uncaught_exception() throw();
}

namespace __gnu_cxx
{
# 113 /usr/include/c++/3.3/exception 3
  void __verbose_terminate_handler ();
}

}
# 39 /usr/include/c++/3.3/typeinfo 2 3

extern C++ {

namespace __cxxabiv1
{
  class __class_type_info;
}
# 55 /usr/include/c++/3.3/typeinfo 3
namespace std
{






  class type_info
  {
  public:




virtual ~type_info();

  private:

type_info operator=(const type_info);
type_info(const type_info);

  protected:
const char *__name;

  protected:
explicit type_info(const char *__n): __name(__n) { }

  public:



const char* name() const
{ return __name; }
# 101 /usr/include/c++/3.3/typeinfo 3
bool before(const type_info __arg) const
{ return __name  __arg.__name; }
bool operator==(const type_info __arg) const
{ return __name == __arg.__name; }

bool operator!=(const type_info __arg) const
{ return !operator==(__arg); }


  public:

virtual bool __is_pointer_p() const;

virtual bool __is_function_p() const;







virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj,
unsigned __outer) const;


virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target,
 void **__obj_ptr) const;
  };






  class bad_cast : public exception
  {
  public:
bad_cast() throw() { }


virtual ~bad_cast() throw();
  };


  class bad_typeid : public exception
  {
  public:
bad_typeid () throw() { }


virtual ~bad_typeid() throw();
  };
}

}
# 3 ice-typeid.cc 2

class BaseB
{
public:
  virtual ~BaseB() {}
};
# 40 ice-typeid.cc
int bug5(BaseB * o)
{
  int i;
  return (typeid(typeid(*o)) == typeid(i));
}




Output from g++ 3.4 -E :


# 1 ice-typeid.cc
# 1 built-in
# 1 command line
# 1 ice-typeid.cc

# 1 /usr/include/c++/3.4/typeinfo 1 3
# 38 /usr/include/c++/3.4/typeinfo 3
# 1 /usr/include/c++/3.4/exception 1 3
# 40 /usr/include/c++/3.4/exception 3
extern C++ {

namespace std
{
# 52 /usr/include/c++/3.4/exception 3
  

[Bug libobjc/26402] New: thr-objc.c might define _XOPEN_SOURCE unnecessarily

2006-02-21 Thread gcc-bugzilla at gcc dot gnu dot org

As described in PR libobjc/26309, defining _XOPEN_SOURCE in thr-objc.c
breaks bootstrap on Tru64 UNIX V4.0F.  It is yet unclear why this
definition is necessary at all, so instead of the fix/workaround commited
for that PR, it might be possible to avoid defining _XOPEN_SOURCE in the
first place.

Environment:
System: OSF1 rimsky V4.0 1229 alpha
Machine: alpha

host: alpha-dec-osf4.0f
build: alpha-dec-osf4.0f
target: alpha-dec-osf4.0f
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf4.0f --build
alpha-dec-osf4.0f --target alpha-dec-osf4.0f
--with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap

How-To-Repeat:
Cf. PR libobjc/26309.


-- 
   Summary: thr-objc.c might define _XOPEN_SOURCE unnecessarily
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libobjc
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf4.0f
  GCC host triplet: alpha-dec-osf4.0f
GCC target triplet: alpha-dec-osf4.0f


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



[Bug c++/26337] New: aliasing causes stale data to be used

2006-02-17 Thread gcc-bugzilla at gcc dot gnu dot org



We are targetting the compilers for a system-on-chip solution we are
developing based on an ARM 926 which is without an FPU so we have
defaulted on SOFTWARE FLOATING POINT.

 #define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | \
 ARM_FLAG_APCS_FRAME | ARM_FLAG_MMU_TRAPS)


We run the executables either on a third party (ARM 926) development
boa
rd or 
an our chip simulator. However the bug can be shown in the assembler
output.

We have come across a problem which is present in 3.4.1 compiler and
when we investigated (by quickly building) a 3.4.5 compiler we came
across the same bug. The samllest program which illustrates the bug is
brokenPointer.cxx; 


/* - START  */

#ifdef DEBUG
#include stdio.h
#endif

typedef unsigned intuint32_t;
typedef uint32_tData[2];

void dump( Data *data, uint32_t count )
{
uint32_ti;

for( i = 0; i  count; i++ )
#ifdef DEBUG
printf( 0x%08X - 0x%08X\n, data[i][0], data[i][1] );
#else
data[i][0] +=  data[i][1] ;
#endif
}

float sx, sy;

void moo( float fx[2], float fy[2], uint32_t size[2], uint32_t params[2] )
{
sx = (fx[1] - fx[0]) / size[0];
sy = (fy[1] - fy[0]) / size[1];

Datadata[] = {
{  0,   0xAA55AA55 },
{  1,   0 },
{  2,   1 },
{  3,   2 },
{  6,   16 },
{  7,   params[0] },
{  8,   params[1] },
{  9,   *((uint32_t *) sx) },
{ 10,   *((uint32_t *) sy) },
};

dump( data, sizeof(data) / sizeof(*data) );
}

int main( int argc, char *argv[] )
{
float   fx[2] = { -2, 2 };
float   fy[2] = { -2, 2 };
uint32_tsize[2] = {64, 64};
uint32_tparams[2] = {16, 4};

moo( fx, fy, size, params );
}

/* - END  */




The program we compile, brokenPointer.cxx, produces the output:

  # arm-3d-linux-g++ -Os  -DDEBUG brokenPointer.cxx   

   0x - 0xAA55AA55
   0x0001 - 0x
   0x0002 - 0x0001
   0x0003 - 0x0002
   0x0006 - 0x0010
   0x0007 - 0x0010
   0x0008 - 0x0004
   0x0009 - 0x3D80
   0x000A - 0x

 When compiled and run on an (x86,say) host the final line is
 correctly output as:

::  ::

   0x000A - 0x3D80

 We can illustrate the bug in the assembler code
   arm-3d-linux-g++ -S -Os  brokenPointer.cxx

illustrates the bug in brokenPointer.s 

The source code section going wrong is:

  -- extract start --

  sy = (fy[1] - fy[0]) / size[1];  /* true value computed */

  Datadata[] = {
::

  { 10,   *((uint32_t *) sy) }, /* wrong value saved
he
re */

  -- extract finish --

 ::
bl  __divsf3/* sy = (fy[1] - fy[0]) / size[1]; */
ldr r3, .L13+8
ldr r6, [r5, #4]
ldr r7, [r7, #0]
ldr r5, [r5, #0]
str r3, [fp, #-104]
mov r3, #3
str r3, [fp, #-84]
add r3, r3, r3
str r3, [fp, #-76]
add r3, r3, #10
mov ip, #1
str r3, [fp, #-72]
sub r3, r3, #9
mov lr, #2
mov r4, #9
ldr r8, [sl, #0]   /* BUG: this is early y being load
ed */
str r3, [fp, #-68]
add r3, r3, ip
mov r2, #0
str r0, [sl, #0]@ float/* r0 is the __divsf3 result so is t
he true y result */
str r3, [fp, #-60]
mov r1, r4
add r3, r3, lr
sub r0, fp, #108
str r2, [fp, #-96]
str ip, [fp, #-88]
str lr, [fp, #-80]
str r3, [fp, #-44]
str r5, [fp, #-64]
str r6, [fp, #-56]
str r7, [fp, #-48]
str r8, [fp, #-40]  /* BUG:  *((uint32_t *) sy is taking the
 early value */
str r2, [fp, #-108]

 What happens is that the compiler has not stored the reult of the __divsf
3 
 which is in r0 until very late in the day. In the meantime it loads r8
 from where it thinks the result is but at the time r8 is loaded it has not
 yet stored r0 !

Environment:
System: Linux federation.3dlabs.com 2.4.21-27.ELsmp #1 SMP Mon Feb 28 16:43:09
EST 2005 i686 athlon i386 GNU/Linux
Architecture: i686


host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: arm-3d-linux-gnu
configured with: 

[Bug libgomp/26308] New: libgomp bootstrap failure on Tru64 UNIX V4.0F

2006-02-15 Thread gcc-bugzilla at gcc dot gnu dot org

Mainline as of 20060206 fails to bootstrap on alpha-dec-osf4.0f while
building libgomp:

/vol/gcc/obj/gcc-4.2.0-20060206/4.0f-gcc/./gcc/xgcc
-B/vol/gcc/obj/gcc-4.2.0-20060206/4.0f-gcc/./gcc/
-B/vol/gcc/share/alpha-dec-osf4.0f/bin/ -B/vol/gcc/share/alpha-dec-osf4.0f/lib/
-isystem /vol/gcc/share/alpha-dec-osf4.0f/include -isystem
/vol/gcc/share/alpha-dec-osf4.0f/sys-include -DHAVE_CONFIG_H -I.
-I/vol/gcc/src/gcc-dist/libgomp -I.
-I/vol/gcc/src/gcc-dist/libgomp/config/posix -I/vol/gcc/src/gcc-dist/libgomp
-Wall -pthread -Werror -O2 -g -O2 -mieee -MT lock.lo -MD -MP -MF .deps/lock.Tpo
-c /vol/gcc/src/gcc-dist/libgomp/config/posix/lock.c   -DPIC -o .libs/lock.o
In file included from /vol/gcc/src/gcc-dist/libgomp/libgomp.h:43,
 from /vol/gcc/src/gcc-dist/libgomp/config/posix/lock.c:39:
/vol/gcc/obj/gcc-4.2.0-20060206/4.0f-gcc/./gcc/include/pthread.h:877: error:
field '_Pfield' declared as a function

and many more similar errors.  The problem is ultimately due to the fact
that libgomp/posix/lock.c has

/* We need Unix98 extensions to get recursive locks.  */
#define _XOPEN_SOURCE 500

#include libgomp.h

Unfortunately, the following trivial program

#include pthread.h

fails in the same way when compiled with gcc -pthread -D_XOPEN_SOURCE=500.

Since pthread.h has PTHREAD_MUTEX_RECURSIVE even without _XOPEN_SOURCE
defined, one can probably simply omit that definition on Tru64 UNIX (at
least V4.0F, but probably on V5.1B as well).

Environment:
System: OSF1 rimsky V4.0 1229 alpha
Machine: alpha

host: alpha-dec-osf4.0f
build: alpha-dec-osf4.0f
target: alpha-dec-osf4.0f
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf4.0f --build
alpha-dec-osf4.0f --target alpha-dec-osf4.0f
--with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap

How-To-Repeat:
Bootstrap mainline as above.


-- 
   Summary: libgomp bootstrap failure on Tru64 UNIX V4.0F
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgomp
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf4.0f
  GCC host triplet: alpha-dec-osf4.0f
GCC target triplet: alpha-dec-osf4.0f


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



[Bug libobjc/26309] New: libobjc bootstrap failure on Tru64 UNIX V4.0F

2006-02-15 Thread gcc-bugzilla at gcc dot gnu dot org

Mainline as of 20060206 and the 4.1 branch as of 20060208 fail to bootstrap
in libobjc:

/vol/gcc/obj/gcc-4.2.0-20060206/4.0f-gcc/./gcc/xgcc
-B/vol/gcc/obj/gcc-4.2.0-20060206/4.0f-gcc/./gcc/
-B/vol/gcc/share/alpha-dec-osf4.0f/bin/ -B/vol/gcc/share/alpha-dec-osf4.0f/lib/
-isystem /vol/gcc/share/alpha-dec-osf4.0f/include -isystem
/vol/gcc/share/alpha-dec-osf4.0f/sys-include -c -I.
-I/vol/gcc/src/gcc-dist/libobjc -O2 -g -O2 -mieee -W -Wall -Wwrite-strings
-Wstrict-prototypes -DIN_GCC -DIN_TARGET_LIBS -fno-strict-aliasing -fexceptions
-I/vol/gcc/src/gcc-dist/libobjc/objc -I/vol/gcc/src/gcc-dist/libobjc/../gcc
-I/vol/gcc/src/gcc-dist/libobjc/../gcc/config -I../.././gcc
-I/vol/gcc/src/gcc-dist/libobjc/../include
/vol/gcc/src/gcc-dist/libobjc/thr-objc.c   -DPIC -o .libs/thr-objc.o
In file included from /vol/gcc/src/gcc-dist/libobjc/../gcc/gthr-posix.h:43,
 from ../.././gcc/gthr-default.h:1,
 from /vol/gcc/src/gcc-dist/libobjc/../gcc/gthr.h:114,
 from /vol/gcc/src/gcc-dist/libobjc/thr-objc.c:38:
/vol/gcc/obj/gcc-4.2.0-20060206/4.0f-gcc/./gcc/include/pthread.h:877: error:
field '_Pfield' declared as a function
[...]

This is the same problem as PR libgomp/26308: libobjc/thr-objc.c defines
_XOPEN_SOURCE=500 before including gthr.h and thus pthread.h, which
doesn't work on that platform.  This is a regression from the 4.0 branch
introduced by this patch:

2005-11-09  Alexandre Oliva  [EMAIL PROTECTED]

PR other/4372
* thr-objc.c (_XOPEN_SOURCE): Define.

Environment:
System: OSF1 rimsky V4.0 1229 alpha
Machine: alpha

host: alpha-dec-osf4.0f
build: alpha-dec-osf4.0f
target: alpha-dec-osf4.0f
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --host alpha-dec-osf4.0f --build
alpha-dec-osf4.0f --target alpha-dec-osf4.0f
--with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap

How-To-Repeat:
Bootstrap mainline or 4.1 branch as above.


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2006-02-15 
21:15 ---
Fix:
I use the following patch which works around this problem and works
seemlessly on both alpha-dec-osf4.0f and alpha-dec-osf5.1b:

Index: libobjc/thr-objc.c
===
--- libobjc/thr-objc.c  (revision 110838)
+++ libobjc/thr-objc.c  (working copy)
@@ -26,8 +26,11 @@ Boston, MA 02110-1301, USA.  */
 #define _LIBOBJC
 /* The line below is needed for declarations of functions such as
pthread_mutexattr_settype, without which gthr-posix.h may fail to
-   compile within libobjc.  */
+   compile within libobjc.  Unfortunately, this breaks compilation on
+   Tru64 UNIX V4.0F, so disable it there.  */
+#ifndef __osf__
 #define _XOPEN_SOURCE 500
+#endif
 #include config.h
 #include tconfig.h
 #include coretypes.h


-- 
   Summary: libobjc bootstrap failure on Tru64 UNIX V4.0F
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libobjc
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: alpha-dec-osf4.0f
  GCC host triplet: alpha-dec-osf4.0f
GCC target triplet: alpha-dec-osf4.0f


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



[Bug tree-optimization/26144] New: with -O3 and pointer casts, gcc skips if

2006-02-06 Thread gcc-bugzilla at gcc dot gnu dot org

When casting a pointer and checking for == NULL, the check is skipped
when -O3 is enabled.  I found this problem while compiling bind with
uClibc,
but could reproduce the problem with the debian version of gcc and this
simple
test file.

Environment:
System: Linux dungeon2 2.6.11-1-k7-smp #1 SMP Mon Jun 20 22:34:51 MDT 2005 i686
GNU/Linux
Architecture: i686


host: i486-pc-linux-gnu
build: i486-pc-linux-gnu
target: i486-pc-linux-gnu
configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr
--disable-werror --with-tune=i686 --enable-checking=release i486-linux-gnu

How-To-Repeat:
Compile this file:

#include stdio.h
void foo(char **dee) {  *dee = ; }
int main(int argc, char *argv[])
{
struct blah *ptr = argv[1];
if(ptr == NULL)
foo(ptr);
printf(%p, ptr); // output: (nil) expected: 0xADDRESS
return 0;
}


-- 
   Summary: with -O3 and pointer casts, gcc skips if
   Product: gcc
   Version: 4.0.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: devin at dungeon2 dot cainetworks dot com
 GCC build triplet: i486-pc-linux-gnu
  GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu


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



[Bug target/26146] New: Bootstrapping mainline on Solaris 10/x86 fails

2006-02-06 Thread gcc-bugzilla at gcc dot gnu dot org

Trying to bootstrap mainline as of 20060206 on i386-pc-solaris2.10 with gas
2.15 and no options to select a specific target fails when trying to build
the amd64 libgcc multilib:

/vol/gcc/obj/gcc-4.2.0-20060206/10-gcc-gas/./gcc/xgcc
-B/vol/gcc/obj/gcc-4.2.0-20060206/10-gcc-gas/./gcc/
-B/vol/gcc/share/i386-pc-solaris2.10/bin/
-B/vol/gcc/share/i386-pc-solaris2.10/lib/ -isystem
/vol/gcc/share/i386-pc-solaris2.10/include -isystem
/vol/gcc/share/i386-pc-solaris2.10/sys-include -O2 -g -O2  -DIN_GCC-W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
 -isystem ./include  -I. -Iamd64 -I/vol/gcc/src/gcc-dist/gcc
-I/vol/gcc/src/gcc-dist/gcc/amd64 -I/vol/gcc/src/gcc-dist/gcc/../include
-I/vol/gcc/src/gcc-dist/gcc/../libcpp/include -I/vol/gnu/obj/gmp-4.1.3/mpfr
-I/vol/gnu/obj/gmp-4.1.3 -I/vol/gcc/src/gcc-dist/gcc/../libdecnumber
-I../libdecnumber -m64 \
-c /vol/gcc/src/gcc-dist/gcc/config/i386/gmon-sol2.c -o amd64/gmon.o
/vol/gcc/src/gcc-dist/gcc/config/i386/gmon-sol2.c:1: error: CPU you selected
does not support x86-64 instruction set
make[5]: *** [amd64/gmon.o] Error 1

This is due to this patch:

2006-01-19  Jan Hubicka  [EMAIL PROTECTED]
H.J. Lu  [EMAIL PROTECTED]
Evandro Menezes [EMAIL PROTECTED]

* invoke.texi (generic): Document
(i686) Update.
* config.gcc: Make x86_64-* and i686-* default to generic tunning.

Adding -v to the xgcc invocation above, I see

/vol/gcc/obj/gcc-4.2.0-20060206/10-gcc-gas/./gcc/cc1 -E -quiet -v -I. -Iamd64
-I/vol/gcc/src/gcc-dist/gcc -I/vol/gcc/src/gcc-dist/gcc/amd64
-I/vol/gcc/src/gcc-dist/gcc/../include
-I/vol/gcc/src/gcc-dist/gcc/../libcpp/include -I/vol/gnu/obj/gmp-4.1.3/mpfr
-I/vol/gnu/obj/gmp-4.1.3 -I/vol/gcc/src/gcc-dist/gcc/../libdecnumber
-I../libdecnumber -imultilib amd64 -iprefix
/amnt/figaro/volumes/obj-gcc/gcc/obj.sol86/gcc-4.2.0-20060206/10-gcc-gas/gcc/../lib/gcc/i386-pc-solaris2.10/4.2.0/
-isystem /vol/gcc/obj/gcc-4.2.0-20060206/10-gcc-gas/./gcc/include -DIN_GCC
-isystem /vol/gcc/share/i386-pc-solaris2.10/include -isystem
/vol/gcc/share/i386-pc-solaris2.10/sys-include -isystem ./include
/vol/gcc/src/gcc-dist/gcc/config/i386/gmon-sol2.c -m64 -mtune=i386 -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-fworking-directory -O2 -O2 -fpch-preprocess -o gmon-sol2.i

So an implicit -mtune=i386 is passed, which conflicts with -m64 as observed.

Environment:
System: SunOS australien 5.10 Generic_118844-19 i86pc i386 i86pc
Architecture: i86pc


host: i386-pc-solaris2.10
build: i386-pc-solaris2.10
target: i386-pc-solaris2.10
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --with-gnu-as
--with-as=/usr/sfw/bin/gas --with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap

How-To-Repeat:
Bootstrap mainline as described above.


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2006-02-07 
01:10 ---
Fix:
As a workaround, I can configure for i386-sun-solaris2.10; this bootstrap
is currently in stage2 and thus isn't affected.


-- 
   Summary: Bootstrapping mainline on Solaris 10/x86 fails
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: i386-pc-solaris2.10
  GCC host triplet: i386-pc-solaris2.10
GCC target triplet: i386-pc-solaris2.10


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



[Bug libffi/26048] New: libffi doesn't build on Solaris 10/x86 with native assembler

2006-01-31 Thread gcc-bugzilla at gcc dot gnu dot org

When trying to bootstrap mainline on Solaris 10/x86 with the native
assembler, building libffi fails:

/vol/gcc/obj/gcc-4.2.0-20060126/10-gcc/./gcc/xgcc
-B/vol/gcc/obj/gcc-4.2.0-20060126/10-gcc/./gcc/
-B/vol/gcc/share/i386-pc-solaris2.10/bin/
-B/vol/gcc/share/i386-pc-solaris2.10/lib/ -isystem
/vol/gcc/share/i386-pc-solaris2.10/include -isystem
/vol/gcc/share/i386-pc-solaris2.10/sys-include -I.
-I/vol/gcc/src/gcc-dist/libffi/include -Iinclude
-I/vol/gcc/src/gcc-dist/libffi/src -O2 -g -O2 -c
/vol/gcc/src/gcc-dist/libffi/src/x86/sysv.S  -fPIC -DPIC -o
src/x86/.libs/sysv.o
Assembler: 
/var/tmp//ccQLHd1V.s, line 138 : Syntax error
/var/tmp//ccQLHd1V.s, line 138 : Illegal character: 7e
/var/tmp//ccQLHd1V.s, line 139 : Syntax error
/var/tmp//ccQLHd1V.s, line 139 : Illegal character: 7e
/var/tmp//ccQLHd1V.s, line 146 : Syntax error
/var/tmp//ccQLHd1V.s, line 146 : Illegal character: 7e
/var/tmp//ccQLHd1V.s, line 204 : Warning: Illegal subtraction -
symbols from different sections: .LFB1, .DOT-3
/var/tmp//ccQLHd1V.s, line 223 : Warning: Illegal subtraction -
symbols from different sections: .LFB2, .DOT-4
/var/tmp//ccQLHd1V.s, line 246 : Warning: Illegal subtraction -
symbols from different sections: .LFB3, .DOT-5
make[4]: *** [src/x86/sysv.lo] Error 1

The code in question (from running the command above with -save-temps) is

ffi_closure_raw_SYSV:
[...]
 movl ((10 + 3)  ~3)(%eax), %esi   line 138
 movl 10 + 3)  ~3) + 4) + 4)(%eax), %edx   line 139
[...]
 call *(((10 + 3)  ~3) + 4)(%eax)  line 146

 .long .LEFDE1-.LASFDE1
.LASFDE1:
 .long .LASFDE1-.Lframe1
 .long .LFB1-.  line 204

I had already noticed this on 20051006, but hadn't reported it yet since
the Solaris 10/x86 native as doesn't work due to still unfixed PR
target/23359.

The first part of the problem might perhaps be worked around by manual
calculations as in src/mips/ffitarget.h, but I don't know a good solution
for the second problem.

The bug was introduced by this patch:

2005-08-11  Jakub Jelinek  [EMAIL PROTECTED]

* configure.ac (HAVE_HIDDEN_VISIBILITY_ATTRIBUTE): New test.
(AH_BOTTOM): Add FFI_HIDDEN definition.
* configure: Rebuilt.
* fficonfig.h.in: Rebuilt.
* src/powerpc/ffi.c (hidden): Remove.
(ffi_closure_LINUX64, ffi_prep_args64, ffi_call_LINUX64,
ffi_closure_helper_LINUX64): Use FFI_HIDDEN instead of hidden.
* src/powerpc/linux64_closure.S (ffi_closure_LINUX64,
.ffi_closure_LINUX64): Use FFI_HIDDEN instead of .hidden.
* src/x86/ffi.c (ffi_closure_SYSV, ffi_closure_raw_SYSV): Remove,
add FFI_HIDDEN to its prototype.
(ffi_closure_SYSV_inner): New.
* src/x86/sysv.S (ffi_closure_SYSV, ffi_closure_raw_SYSV): New.


This is a regression from at least 3.4 where it was possible to bootstrap
on Solaris 10/x86 with the native assembler.  I don't know for sure about
4.0, though.

Environment:
System: SunOS erebus 5.10 Generic_Patch i86pc i386 i86pc
Architecture: i86pc


host: i386-pc-solaris2.10
build: i386-pc-solaris2.10
target: i386-pc-solaris2.10
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --disable-multilib
--with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap

How-To-Repeat:
Bootstrap mainline as described above.


-- 
   Summary: libffi doesn't build on Solaris 10/x86 with native
assembler
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libffi
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: i386-pc-solaris2.10
  GCC host triplet: i386-pc-solaris2.10
GCC target triplet: i386-pc-solaris2.10


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



[Bug bootstrap/26050] New: Use of u_int32_t in libgcc-math breaks bootstrap on Solaris 10/x86

2006-01-31 Thread gcc-bugzilla at gcc dot gnu dot org

Current mainline (as of 20060131) fails to bootstrap on Solaris 10/x86 in
libgcc-math:

/vol/gcc/obj/gcc-4.2.0-20060131/10-gcc/./gcc/xgcc
-B/vol/gcc/obj/gcc-4.2.0-20060131/10-gcc/./gcc/
-B/vol/gcc/share/i386-pc-solaris2.10/bin/
-B/vol/gcc/share/i386-pc-solaris2.10/lib/ -isystem
/vol/gcc/share/i386-pc-solaris2.10/include -isystem
/vol/gcc/share/i386-pc-solaris2.10/sys-include -DPACKAGE_NAME=\libgcc-math\
-DPACKAGE_TARNAME=\libgcc-math\ -DPACKAGE_VERSION=\1.0\
-DPACKAGE_STRING=\libgcc-math 1.0\ -DPACKAGE_BUGREPORT=\\
-DPACKAGE=\libgcc-math\ -DVERSION=\1.0\ -DHAVE_HIDDEN_VISIBILITY=1 -I.
-I/vol/gcc/src/gcc-dist/libgcc-math/i386
-I/vol/gcc/src/gcc-dist/libgcc-math/i386/../include -include
/vol/gcc/src/gcc-dist/libgcc-math/i386/sse2.h -Wall -O2 -g -msse2 -msseregparm
-mfpmath=sse -march=pentium3 -fno-math-errno -fno-trapping-math
-ffinite-math-only -fno-rounding-math -fno-signaling-nans -D__NO_MATH_INLINES
-O2 -g -O2 -MT libsse2_la-e_acosf.lo -MD -MP -MF .deps/libsse2_la-e_acosf.Tpo
-c /vol/gcc/src/gcc-dist/libgcc-math/i386/../flt-32/e_ac!
 osf.c  -fPIC -DPIC -o .libs/libsse2_la-e_acosf.o
In file included from
/vol/gcc/src/gcc-dist/libgcc-math/i386/../flt-32/e_acosf.c:21:
/vol/gcc/src/gcc-dist/libgcc-math/i386/../include/math_private.h:58: error:
expected specifier-qualifier-list before 'u_int32_t'
/vol/gcc/src/gcc-dist/libgcc-math/i386/../include/math_private.h:129: error:
expected specifier-qualifier-list before 'u_int32_t'
/vol/gcc/src/gcc-dist/libgcc-math/i386/../flt-32/e_acosf.c: In function
'__libm_sse2_acosf':
/vol/gcc/src/gcc-dist/libgcc-math/i386/../flt-32/e_acosf.c:52: error:
'ieee_float_shape_type' has no member named 'word'
/vol/gcc/src/gcc-dist/libgcc-math/i386/../flt-32/e_acosf.c:80: error:
'ieee_float_shape_type' has no member named 'word'
/vol/gcc/src/gcc-dist/libgcc-math/i386/../flt-32/e_acosf.c:81: error:
'ieee_float_shape_type' has no member named 'word'
make[3]: *** [libsse2_la-e_acosf.lo] Error 1
make[3]: *** Waiting for unfinished jobs

u_int32_t isn't declared anywhere, but is used in several files
unconditionally:

libgcc-math/dbl-64/e_log10.c
libgcc-math/dbl-64/e_rem_pio2.c
libgcc-math/dbl-64/s_floor.c
libgcc-math/flt-32/e_atan2f.c
libgcc-math/flt-32/e_log10f.c
libgcc-math/flt-32/e_powf.c
libgcc-math/flt-32/e_rem_pio2f.c
libgcc-math/flt-32/e_sqrtf.c
libgcc-math/flt-32/s_floorf.c
libgcc-math/include/math_private.h

Environment:
System: SunOS australien 5.10 Generic_118844-19 i86pc i386 i86pc
Architecture: i86pc


host: i386-pc-solaris2.10
build: i386-pc-solaris2.10
target: i386-pc-solaris2.10
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --disable-multilib
--with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,java,objc,ada --disable-libmudflap

How-To-Repeat:
Bootstrap mainline as described above.


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2006-01-31 
21:32 ---
Fix:
Either declare u_int32_t if missing (or, far better) use the ISO C uint32_t
type instead (and provide a definition if missing, cf. config/stdint.m4).

A trivial patch which globally uses uint32_t in libgcc-math allowed the
bootstrap to finish; test currently in progress.


-- 
   Summary: Use of u_int32_t in libgcc-math breaks bootstrap on
Solaris 10/x86
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: i386-pc-solaris2.10
  GCC host triplet: i386-pc-solaris2.10
GCC target triplet: i386-pc-solaris2.10


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



[Bug target/26051] New: libgcc_s.so.1 causes SEGV on Solaris 10/x86

2006-01-31 Thread gcc-bugzilla at gcc dot gnu dot org

Since at least 20060126, make check on Solaris 10/x86 fails with a SEGV if
expect is invoked.  I could trace this down to libgcc_s.so.1: If I point
LD_LIBRARY_PATH at the newly built libgcc_s.so.1, expect crashes
immediately, if I use one from e.g. GCC 3.1, it works as expected.  Other
programs (e.g. gctest in boehm-gc) are equally affected.

This doesn't happen e.g. in gcc 4.1.0 as of 20060117, so this is a mainline
regression.

I have not been able to really debug this since I don't get any symbols
when running under gdb.  It seems that a deep recursion (inside libgcc_s?)
is the problem:

% LD_LIBRARY_PATH=. gdb /vol/tcl-8.4/bin/expect
GNU gdb 6.3.50_2004-11-10-cvs
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i386-pc-solaris2.10...
Function fancy_abort not defined.
Function internal_error not defined.
Breakpoint 1 at 0x8050894
Function abort not defined.
(gdb) run
Starting program: /amnt/figaro/volumes/adm-sol86/tcl-8.4/bin.sol86/expect 
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 0074
Breakpoint 1 at 0xfecf3d40

Program received signal SIGSEGV, Segmentation fault.
0x0216 in ?? ()
(gdb) where
#0  0x0216 in ?? ()
#1  0x08050ad2 in frame_dummy ()
#2  0x0805124f in _init ()
#3  0x080509d7 in _start ()
#4  0x0001 in ?? ()
#5  0x08047884 in ?? ()
#6  0x0804788c in ?? ()
#7  0x080509b9 in _start ()
#8  0x08051257 in _init ()
#9  0xfefd5bec in ?? ()
#10 0x in ?? ()
#11 0x in ?? ()
#12 0x0001 in ?? ()
#13 0x08047998 in ?? ()
#14 0x in ?? ()
#15 0x080479d0 in ?? ()
#16 0x080479ee in ?? ()
#17 0x08047a1d in ?? ()
#18 0x08047a24 in ?? ()
#19 0x08047a37 in ?? ()
#20 0x08047a4b in ?? ()
#21 0x08047a5d in ?? ()
#22 0x08047a80 in ?? ()
#23 0x08047aa1 in ?? ()
#24 0x08047aba in ?? ()
#25 0x08047ba7 in ?? ()
#26 0x08047bc6 in ?? ()
#27 0x08047bd5 in ?? ()
#28 0x08047bdd in ?? ()
#29 0x08047bf9 in ?? ()
#30 0x08047c0f in ?? ()
#31 0x08047c29 in ?? ()
#32 0x08047c32 in ?? ()
#33 0x08047c3c in ?? ()
#34 0x08047c59 in ?? ()
#35 0x08047c60 in ?? ()
#36 0x08047c87 in ?? ()
#37 0x08047c92 in ?? ()
#38 0x08047d01 in ?? ()
#39 0x08047d2c in ?? ()
#40 0x08047d34 in ?? ()
#41 0x08047d3f in ?? ()
#42 0x08047d4a in ?? ()
#43 0x08047d5e in ?? ()
#44 0x08047d81 in ?? ()
#45 0x08047dac in ?? ()
#46 0x08047dc2 in ?? ()
#47 0x08047de3 in ?? ()
#48 0x08047df0 in ?? ()
#49 0x08047e0a in ?? ()
#50 0x08047e22 in ?? ()
#51 0x08047e30 in ?? ()
#52 0x08047e42 in ?? ()
#53 0x08047e51 in ?? ()
#54 0x08047e5c in ?? ()
#55 0x in ?? ()
#56 0x07d8 in ?? ()
#57 0x08047fbd in ?? ()
#58 0x07de in ?? ()
#59 0x08047fc3 in ?? ()
#60 0x0003 in ?? ()
#61 0x08050034 in ?? ()
#62 0x0004 in ?? ()
#63 0x0020 in ?? ()
#64 0x0005 in ?? ()
#65 0x0005 in ?? ()
#66 0x0009 in ?? ()
#67 0x08050984 in _PROCEDURE_LINKAGE_TABLE_ ()
#68 0x07e0 in ?? ()
#69 0xfeffa000 in ?? ()
#70 0x0007 in ?? ()
#71 0xfefc9000 in ?? ()
#72 0x0008 in ?? ()
#73 0x in ?? ()
#74 0x0006 in ?? ()
#75 0x1000 in ?? ()
#76 0x07e1 in ?? ()
#77 0x0002 in ?? ()
#78 0x07d9 in ?? ()
#79 0x1ff7 in ?? ()
#80 0x in ?? ()
#81 0x in ?? ()
#82 0x6e6d612f in ?? ()
#83 0x69662f74 in ?? ()
#84 0x6f726167 in ?? ()
#85 0x6c6f762f in ?? ()
#86 0x73656d75 in ?? ()
#87 0x6d64612f in ?? ()
#88 0x6c6f732d in ?? ()
#89 0x742f3638 in ?? ()
#90 0x382d6c63 in ?? ()
#91 0x622f342e in ?? ()
#92 0x732e6e69 in ?? ()
#93 0x36386c6f in ?? ()
#94 0x7078652f in ?? ()
#95 0x00746365 in ?? ()
#96 0x4c49414d in ?? ()
#97 0x48544150 in ?? ()
#98 0x6f682f3d in ?? ()
#99 0x2f73656d in ?? ()
#100 0x6d2f6f72 in ?? ()
#101 0x2f6c6961 in ?? ()
#102 0x6f626e69 in ?? ()
#103 0x57500078 in ?? ()
#104 0x762f3d44 in ?? ()
#105 0x672f6c6f in ?? ()
#106 0x6f2f6363 in ?? ()
#107 0x672f6a62 in ?? ()
#108 0x342d6363 in ?? ()
#109 0x302e322e in ?? ()
#110 0x3030322d in ?? ()
#111 0x33313036 in ?? ()
#112 0x30312f31 in ?? ()
#113 0x6363672d in ?? ()
#114 0x6363672f in ?? ()
#115 0x3d5a5400 in ?? ()
#116 0x0054454d in ?? ()
#117 0x444e4957 in ?? ()
#118 0x4449574f in ?? ()
#119 0x3038313d in ?? ()
#120 0x30353533 in ?? ()
#121 0x48003838 in ?? ()
#122 0x4e54534f in ?? ()
#123 0x3d454d41 in ?? ()
#124 0x74737561 in ?? ()
#125 0x696c6172 in ?? ()
#126 0x4c006e65 in ?? ()
#127 0x494c5f44 in ?? ()
#128 0x52415242 in ?? ()
#129 0x41505f59 in ?? ()
#130 0x2e3d4854 in ?? ()
#131 0x534f4800 in ?? ()
#132 0x494c4154 in ?? ()
#133 0x53455341 in ?? ()
#134 0x6f682f3d in ?? ()
#135 0x2f73656d in ?? ()
#136 0x2e2f6f72 in ?? ()
#137 0x74736f68 in ?? ()
#138 0x61696c61 in ?? ()
#139 0x00736573 in ?? ()
#140 0x4f525053 in ?? ()
#141 0x54454e5f in ?? ()
#142 0x4e414542 in ?? ()
#143 0x4f485f53 in ?? ()
#144 

[Bug bootstrap/26053] New: Misdetection of COMDAT group support with GNU as and non-GNU ld

2006-01-31 Thread gcc-bugzilla at gcc dot gnu dot org

When configuring the 4.1 branch (I haven't tried this on mainline yet since
I only recently found a workaround for PR target/24334) on IRIX 6.5 with
GNU as 2.16.1 and the SGI MIPSpro ld, libstdc++.so fails to link:

ld32: FATAL   2  : Internal: at ../../ld/section_type.c In load_info() unknown
section type
collect2: ld returned 1 exit status
make[5]: *** [libstdc++.la] Error 1

While the error message could be clearer ;-), this is obviously due to e.g.

allocator-inst.o:

   SECTION  HEADER  TABLE 
[No]   Type  Addr   Offset SizeName
   Link   Info   AdralgnEntsizeFlags

[1]0x11  0  0x34   0x8 .group
   43 0x25   0x40x40x 


(excerpt of elfdump -h output): Section Type 0x11 (obviously unknown to
elfdump) is SHT_GROUP.  While the version of GNU as used obviously supports
COMDAT group, the native ld does not.

It turns out that the test in gcc/configure.ac for COMDAT group support is
wrong if using GNU as with a non-GNU ld:

if test $in_tree_ld != yes  test x$ld_vers != x; then
  comdat_group=yes
  if test 0$ld_date -lt 20050308; then
if test -n $ld_date; then
  # If there was date string, but was earlier than 2005-03-08, fail
  comdat_group=no
elif test $ld_vers_major -lt 2; then
  comdat_group=no
elif test $ld_vers_major -eq 2 -a $ld_vers_minor -lt 16; then
  comdat_group=no
fi
  fi
  if test $comdat_group = no; then
gcc_cv_as_comdat_group=no
gcc_cv_as_comdat_group_percent=no
  fi
fi

For non-in_tree_ld and non-GNU ld (i.e. $ld_vers empty), only
gcc_cv_as_comdat_group* results from above this section are used, but
instead for non-GNU ld, no COMDAT group support should be assumed.

It may be that e.g. the Solaris 10+ ld does support this, but we either
need a configure check for this or statically define this in configure.ac
if it is hard/impossible to check at configure time.

This triggers only with GNU as 2.16.1, since 2.15 on IRIX 6 SEGVs with
gas COMDAT group tests, thus GNU as isn't known to support COMDAT group in
2.15.

Environment:
System: IRIX sculptor 6.5 10060437 IP32



host: mips-sgi-irix6.5
build: mips-sgi-irix6.5
target: mips-sgi-irix6.5
configured with: /vol/gcc/src/gcc-4.1-branch-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --with-gnu-as
--with-as=/vol/gcc/lib/gas-2.16.1 --enable-libgcj --disable-multilib
--with-gmp-dir=/vol/gnu/obj/gmp-4.1.3
--with-mpfr-dir=/vol/gnu/obj/gmp-4.1.3/mpfr
--enable-languages=c,c++,fortran,java,objc,ada

How-To-Repeat:
Bootstrap the 4.1 branch (mainline is almost certainly affected as well) as
described above.


--- Comment #1 from ro at techfak dot uni-bielefeld dot de  2006-01-31 
22:29 ---
Fix:
The following patch allowed a bootstrap on the 4.1 branch to finish
successfully:

Index: gcc/configure.ac
===
--- gcc/configure.ac(revision 110450)
+++ gcc/configure.ac(working copy)
@@ -2175,10 +2175,13 @@ if test $in_tree_ld != yes  test x$ld
   comdat_group=no
 fi
   fi
-  if test $comdat_group = no; then
-gcc_cv_as_comdat_group=no
-gcc_cv_as_comdat_group_percent=no
-  fi
+else
+  # assume linkers other than GNU ld don't support COMDAT group
+  comdat_group=no
+fi
+if test $comdat_group = no; then
+  gcc_cv_as_comdat_group=no
+  gcc_cv_as_comdat_group_percent=no
 fi
 AC_DEFINE_UNQUOTED(HAVE_COMDAT_GROUP,
   [`if test $gcc_cv_as_comdat_group = yes || test
$gcc_cv_as_comdat_group_percent = yes; then echo 1; else echo 0; fi`],

I need to test this on mainline and properly submit to gcc-patches.


-- 
   Summary: Misdetection of COMDAT group support with GNU as and
non-GNU ld
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: mips-sgi-irix6.5
  GCC host triplet: mips-sgi-irix6.5
GCC target triplet: mips-sgi-irix6.5


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



  1   2   3   >