[Bug rtl-optimization/36419] [4.3/4.4 Regression] Wrong unwind info with -Os -fasynchronous-unwind-tables

2008-07-10 Thread jakub at gcc dot gnu dot org


--- Comment #14 from jakub at gcc dot gnu dot org  2008-07-10 07:40 ---
Subject: Bug 36419

Author: jakub
Date: Thu Jul 10 07:39:54 2008
New Revision: 137689

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137689
Log:
PR rtl-optimization/36419
* combine-stack-adj.c (adjust_frame_related_expr): New function.
(combine_stack_adjustments_for_block): Call it if needed.  Delete
correct insn.
* dwarf2out.c (dwarf2out_frame_debug_expr): Adjust
DW_CFA_GNU_args_size if CSA pass merged some adjustments into
prologue sp adjustment.

* g++.dg/eh/async-unwind1.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/eh/async-unwind1.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/combine-stack-adj.c
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug rtl-optimization/36419] [4.3/4.4 Regression] Wrong unwind info with -Os -fasynchronous-unwind-tables

2008-07-10 Thread jakub at gcc dot gnu dot org


--- Comment #15 from jakub at gcc dot gnu dot org  2008-07-10 07:53 ---
Subject: Bug 36419

Author: jakub
Date: Thu Jul 10 07:52:36 2008
New Revision: 137690

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137690
Log:
PR rtl-optimization/36419
* combine-stack-adj.c (adjust_frame_related_expr): New function.
(combine_stack_adjustments_for_block): Call it if needed.  Delete
correct insn.
* dwarf2out.c (dwarf2out_frame_debug_expr): Adjust
DW_CFA_GNU_args_size if CSA pass merged some adjustments into
prologue sp adjustment.

* g++.dg/eh/async-unwind1.C: New test.

Added:
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/eh/async-unwind1.C
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/combine-stack-adj.c
branches/gcc-4_3-branch/gcc/dwarf2out.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug libstdc++/36647] configure scripts can not find out version of GNU ld 2.18

2008-07-10 Thread YLitvinenko at astana dot oilfield dot slb dot com


--- Comment #4 from YLitvinenko at astana dot oilfield dot slb dot com  
2008-07-10 07:55 ---
Subject: Re:  configure scripts can not find out version
 of GNU ld 2.18

> --- Comment #3 from ian at airs dot com  2008-07-10 01:52 ---
> What is the output of ld --version using your 2.18 version of ld?

$ ld --version
GNU ld (GNU Binutils) 2.18
Copyright 2007 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
$ 


-- 


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



[Bug middle-end/36770] PowerPC generated PTR code inefficiency

2008-07-10 Thread gunnar at greyhound-data dot com


--- Comment #2 from gunnar at greyhound-data dot com  2008-07-10 09:18 
---
(In reply to comment #1)
> forward-propagate is causing some of the issues as shown by:
> int *test2(int *a ){
>   a[1]=a[0];
>   a++;
>   return a;
> }

Your example creates the following ASM code:
test2:
mr 9,3
addi 3,3,4
lwz 0,0(9)
stw 0,4(9)
blr

Correct would be:
test2:
lwz 0,0(3)
stwu 0,4(3)
blr

Is you can see the created bad code is just the same.
This is independent of the register pinning.

Can I understand you comment a verification that the forward propagation is
broken in GCC/PPC?


Kind regards

Gunnar von Boehn


-- 


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



[Bug c++/36760] Simple std::bind use causes warnings with -Wextra

2008-07-10 Thread paolo dot carlini at oracle dot com


--- Comment #21 from paolo dot carlini at oracle dot com  2008-07-10 09:28 
---
> Two questions:
> 1/ Is the text in the documentation that Dirk Mueller added in the last commit
>of PR 30601 now wrong/outdated?

I don't know, I'm not a documentation expert, maybe some tweaks will be
necessary but I may not be able to come to it in the near future, really quite
a few things in my todo list these days, I'm sorry.

> 2/ Does your patch also fix the testcase in PR 36052?

The warning is not emitted anymore, for sure.


-- 


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



[Bug c++/36633] [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-10 Thread paolo dot carlini at oracle dot com


--- Comment #10 from paolo dot carlini at oracle dot com  2008-07-10 09:57 
---
Thanks Mark, frankly I didn't know about "cookies". By the way, naively, the
fact that the warning is emitted only for -O2 doesn't indicate to me a pure
front-end issue...


-- 


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



[Bug c/36782] New: php-5.2.5, error: unable to find a register to spill in class 'R0_REGS'

2008-07-10 Thread masaki dot chikama at gmail dot com
gcc-4.3.0 fail to compile php-5.2.5 with this message.
gcc-4.1.3 can compile without failure.

It's similar to Bug #36684, But -fno-schedule-insns option doesn't help.
I can comiple when I down optimization level (remove -O2).
Is this simply -fno-schedule-insns is ignored by other option ?


/bin/sh /builddir/build/BUILD/php-5.2.5/build-cgi/libtool --silent
--preserve-dup-deps --mode=compile gcc  -Iext/spl/
-I/builddir/build/BUILD/php-5.2.5/ext/spl/ -DPHP_ATOM_INC
-I/builddir/build/BUILD/php-5.2.5/build-cgi/include
-I/builddir/build/BUILD/php-5.2.5/build-cgi/main
-I/builddir/build/BUILD/php-5.2.5 -I/usr/include/libxml2
-I/usr/kerberos/include
-I/builddir/build/BUILD/php-5.2.5/build-cgi/ext/date/lib
-I/builddir/build/BUILD/php-5.2.5/ext/date/lib -I/usr/include/freetype2
-I/usr/include/imap -I/builddir/build/BUILD/php-5.2.5/ext/mbstring/oniguruma
-I/builddir/build/BUILD/php-5.2.5/build-cgi/ext/mbstring/oniguruma
-I/builddir/build/BUILD/php-5.2.5/ext/mbstring/libmbfl
-I/builddir/build/BUILD/php-5.2.5/build-cgi/ext/mbstring/libmbfl
-I/builddir/build/BUILD/php-5.2.5/ext/mbstring/libmbfl/mbfl
-I/builddir/build/BUILD/php-5.2.5/build-cgi/ext/mbstring/libmbfl/mbfl
-I/usr/include/mysql -I/usr/include/ncurses -I/usr/include/pspell
-I/builddir/build/BUILD/php-5.2.5/build-cgi/TSRM
-I/builddir/build/BUILD/php-5.2.5/build-cgi/Zend
-I/builddir/build/BUILD/php-5.2.5/main -I/builddir/build/BUILD/php-5.2.5/Zend
-I/builddir/build/BUILD/php-5.2.5/TSRM
-I/builddir/build/BUILD/php-5.2.5/build-cgi/-I/usr/include -O2 -g -mieee
-fno-strict-aliasing -Wno-pointer-sign -fno-schedule-insns  -c
/builddir/build/BUILD/php-5.2.5/ext/spl/spl_observer.c -o
ext/spl/spl_observer.lo
/builddir/build/BUILD/php-5.2.5/ext/spl/spl_observer.c: In function
'spl_SplObjectStorage_new':
/builddir/build/BUILD/php-5.2.5/ext/spl/spl_observer.c:124: error: unable to
find a register to spill in class 'R0_REGS'
/builddir/build/BUILD/php-5.2.5/ext/spl/spl_observer.c:124: error: this is the
insn:
(insn:HI 99 105 92 2 /builddir/build/BUILD/php-5.2.5/ext/spl/spl_observer.c:124
(set (reg:SI 1 r1 [+4 ])
(mem/u/c:SI (plus:SI (reg/f:SI 1 r1 [202])
(reg:SI 12 r12)) [0 S4 A32])) 172 {movsi_ie}
(expr_list:REG_EQUAL (symbol_ref:SI ("spl_handler_SplObjectStorage") )
(expr_list:REG_DEAD (reg/f:SI 1 r1 [202])
(nil
/builddir/build/BUILD/php-5.2.5/ext/spl/spl_observer.c:124: confused by earlier
errors, bailing out
Preprocessed source stored into /tmp/ccY9MS2w.out file, please attach this to
your bugreport.
make: *** [ext/spl/spl_observer.lo] Error 1

# /usr/bin/gcc -v
Using built-in specs.
Target: sh4-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--build=sh4-redhat-linux
Thread model: posix
gcc version 4.3.0 20080404 (Red Hat 4.3.0-6.fs1.1) (GCC)


-- 
   Summary: php-5.2.5, error: unable to find a register to spill in
class 'R0_REGS'
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: masaki dot chikama at gmail dot com
 GCC build triplet: sh4-redhat-linux
GCC target triplet: sh-*-linux


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



[Bug c/36782] php-5.2.5, error: unable to find a register to spill in class 'R0_REGS'

2008-07-10 Thread masaki dot chikama at gmail dot com


--- Comment #1 from masaki dot chikama at gmail dot com  2008-07-10 10:18 
---
Created an attachment (id=15883)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15883&action=view)
preprocessed file


-- 


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



[Bug bootstrap/36783] New: Build fails in stagefeedback-bubble make target on IRIX 6.5.30 when compiling insn-attrtab.c

2008-07-10 Thread tj at solitudo dot net
This is an Octane2 system running IRIX 6.5.30. Bootstarpping is done with
MipsPro 7.4.3m compiler. Configure environment:

CC='cc -n32 -mips4 -c99' CXX='CC -n32 -mips4' CPP='cc -E' CFLAGS= CXXFLAGS=
CPPFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib -n32' ../../configure
--prefix=/opt/local --sysconfdir=/opt/local/etc --localstatedir=/opt/local/var
--sharedstatedir=/opt/local/var/com --enable-__cxa_atexit
--enable-threads=posix --enable-shared --disable-nls
--enable-languages=c,c++,java,objc,obj-c++,fortran --with-gmp=/opt/local
--with-mpfr=/opt/local --with-as=/opt/local/bin/gnu-as --with-gnu-as

Failing command:

/scratch/garstow/devel/gcc/work/build/./prev-gcc/xgcc
-B/scratch/garstow/devel/gcc/work/build/./prev-gcc/
-B/opt/local/mips-sgi-irix6.5/bin/ -c   -g -O2 -fprofile-use -DIN_GCC   -W
-Wall -Wwrite-strings -Wstrict-prototypes
 -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute
-pedantic -Wno-long-long -Wno-variadic-macros 
-Wno-overlength-strings-DHAVE_CONFIG_H -I. -I. -I../../../work/gcc-
4.3.1/gcc -I../../../work/gcc-4.3.1/gcc/.
-I../../../work/gcc-4.3.1/gcc/../include
-I../../../work/gcc-4.3.1/gcc/../libcpp/include -I/opt/local/include
-I/opt/local/include -I../../../work/gcc-4.3.1/gcc/../libdecnumber -I.
./../../work/gcc-4.3.1/gcc/../libdecnumber/dpd -I../libdecnumber   
insn-attrtab.c -o insn-attrtab.o
../../../work/gcc-4.3.1/gcc/config/mips/mips.md: In function
'get_attr_sb1_fp_pipes':
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: error: coverage mismatch
for function 'get_attr_sb1_fp_pipes' while reading counter 'arcs'
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: note: number of counters
is 9 instead of 8
../../../work/gcc-4.3.1/gcc/config/mips/mips.md: In function 'get_attr_hazard':
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: error: coverage mismatch
for function 'get_attr_hazard' while reading counter 'arcs'
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: note: number of counters
is 192 instead of 187
../../../work/gcc-4.3.1/gcc/config/mips/mips.md: In function
'get_attr_can_delay':
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: error: coverage mismatch
for function 'get_attr_can_delay' while reading counter 'arcs'
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: note: number of counters
is 231 instead of 227
../../../work/gcc-4.3.1/gcc/config/mips/mips.md: In function
'eligible_for_annul_false':
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: error: coverage mismatch
for function 'eligible_for_annul_false' while reading counter 'arcs'
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: note: number of counters
is 358 instead of 306
../../../work/gcc-4.3.1/gcc/config/mips/mips.md: In function
'eligible_for_delay':
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: error: coverage mismatch
for function 'eligible_for_delay' while reading counter 'arcs'
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: note: number of counters
is 743 instead of 729
../../../work/gcc-4.3.1/gcc/config/mips/mips.md: In function
'internal_dfa_insn_code':
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: error: coverage mismatch
for function 'internal_dfa_insn_code' while reading counter 'arcs'
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: note: number of counters
is 7204 instead of 6172
../../../work/gcc-4.3.1/gcc/config/mips/mips.md: In function
'insn_default_latency':
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: error: coverage mismatch
for function 'insn_default_latency' while reading counter 'arcs'
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: note: number of counters
is 6524 instead of 5477
../../../work/gcc-4.3.1/gcc/config/mips/mips.md: In function 'bypass_p':
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: error: coverage mismatch
for function 'bypass_p' while reading counter 'arcs'
../../../work/gcc-4.3.1/gcc/config/mips/mips.md:472: note: number of counters
is 896 instead of 685
make[3]: *** [insn-attrtab.o] Error 1

Any ideas?


-- 
   Summary: Build fails in stagefeedback-bubble make target on IRIX
6.5.30 when compiling insn-attrtab.c
   Product: gcc
   Version: 4.3.1
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tj at solitudo dot net
 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=36783



[Bug bootstrap/36783] Build fails in stagefeedback-bubble make target on IRIX 6.5.30 when compiling insn-attrtab.c

2008-07-10 Thread tj at solitudo dot net


--- Comment #1 from tj at solitudo dot net  2008-07-10 10:21 ---
Created an attachment (id=15884)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15884&action=view)
Build log for this bug

This attachment shows the full make log after running make in the build root
directory after hitting the build error for the first time.


-- 


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



[Bug c++/36784] New: g++ internal compiler error: in remove_insn, at emit-rtl.c:3601

2008-07-10 Thread masaki dot chikama at gmail dot com
gcc-4.3.0 fail to compile cloudy-07.02.01 with this message.
It may be fixed by  
http://gcc.gnu.org/ml/gcc-patches/2008-03/msg01245.html
.


g++ -fPIC -DPIC -O2 -g -mieee   -c -o atmdat_readin.o atmdat_readin.cpp
atmdat_readin.cpp: In function 'void atmdat_readin()':
atmdat_readin.cpp:1746: internal compiler error: in remove_insn, at
emit-rtl.c:3601
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
Preprocessed source stored into /tmp/cc4kyLGA.out file, please attach this to
your bugreport.
make: *** [atmdat_readin.o] Error 1

# /usr/bin/gcc -v
Using built-in specs.
Target: sh4-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--build=sh4-redhat-linux
Thread model: posix
gcc version 4.3.0 20080404 (Red Hat 4.3.0-6.fs1.1) (GCC)


-- 
   Summary: g++ internal compiler error: in remove_insn, at emit-
rtl.c:3601
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: masaki dot chikama at gmail dot com
 GCC build triplet: sh4-redhat-linux
GCC target triplet: sh-*-linux


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



[Bug c++/36784] g++ internal compiler error: in remove_insn, at emit-rtl.c:3601

2008-07-10 Thread masaki dot chikama at gmail dot com


--- Comment #1 from masaki dot chikama at gmail dot com  2008-07-10 10:27 
---
Created an attachment (id=15885)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15885&action=view)
gzipped preprocessed file 


-- 


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



[Bug ada/36785] New: Segmentation fault in Gnat.Regexp

2008-07-10 Thread baldrick at gcc dot gnu dot org
$ gnatmake rtest.adb
gcc -c rtest.adb
gnatbind -x rtest.ali
gnatlink rtest.ali
$ ./rtest

raised STORAGE_ERROR : stack overflow (or erroneous memory access)

Also occurs with GNAT GPL 2008.

-- chop here --
with Gnat.Regexp;
procedure RTest is
   R : constant Gnat.Regexp.Regexp := Gnat.Regexp.Compile
 (Pattern => ".*AB.*|.*XYZ.*|.*0123456.*");
   B : Boolean;
begin
   B := Gnat.Regexp.Match("A", R);
end;


-- 
   Summary: Segmentation fault in Gnat.Regexp
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: baldrick at gcc dot gnu dot org
 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=36785



[Bug c/36786] New: ICE in extract_insn, at recog.c:1990

2008-07-10 Thread aldot at gcc dot gnu dot org
[EMAIL PROTECTED]:/scratch/obj.x86_64/gcc-4.4/x86_64-linux-gnu/libgcc$
/scratch/obj.x86_64/gcc-4.4/./gcc/xgcc -B/scratch/obj.x86_64/gcc-4.4/./gcc/
-B/opt/x86_64/gcc-4.4//x86_64-linux-gnu/bin/
-B/opt/x86_64/gcc-4.4//x86_64-linux-gnu/lib/ -isystem
/opt/x86_64/gcc-4.4//x86_64-linux-gnu/include -isystem
/opt/x86_64/gcc-4.4//x86_64-linux-gnu/sys-include -O0 -g3 -ggdb3
-finline-limit=1 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wcast-qual -Wc++-compat -Wold-style-definition  -isystem
./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  
-I. -I. -I../.././gcc -I../../../../src/gcc-4.4/libgcc
-I../../../../src/gcc-4.4/libgcc/. -I../../../../src/gcc-4.4/libgcc/../gcc
-I../../../../src/gcc-4.4/libgcc/../include
-I../../../../src/gcc-4.4/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT
-DHAVE_CC_TLS -DUSE_TLS -o _floatdisf.o -MT _floatdisf.o -MD -MP -MF
_floatdisf.dep -DL_floatdisf -c ../../../../src/gcc-4.4/libgcc/../gcc/libgcc2.c
-fvisibility=hidden -DHIDE_EXPORTS
../../../../src/gcc-4.4/libgcc/../gcc/libgcc2.c: In function ‘__floattisf’:
../../../../src/gcc-4.4/libgcc/../gcc/libgcc2.c:1530: error: unrecognizable
insn:
(insn 140 139 141 8 ../../../../src/gcc-4.4/libgcc/../gcc/libgcc2.c:1511
(parallel [
(set (reg:DI 1 dx [ D.5355+8 ])
(ashiftrt:SI (reg:DI 1 dx [ D.5355+8 ])
(const_int 31 [0x1f])))
(clobber (reg:CC 17 flags))
]) -1 (nil))
../../../../src/gcc-4.4/libgcc/../gcc/libgcc2.c:1530: internal compiler error:
in extract_insn, at recog.c:1990


reduced testcase:

typedef int DItype __attribute__ ((mode (DI)));
typedef unsigned int UDItype __attribute__ ((mode (DI)));
typedef int TItype __attribute__ ((mode (TI)));
__floattisf (TItype u)
{
  DItype hi = u >> (8 * 8);
  UDItype count, shift;
  hi = u >> shift;
}

gives:
$ /scratch/obj.x86_64/gcc-4.4/./gcc/xgcc -B/scratch/obj.x86_64/gcc-4.4/./gcc/
-B/opt/x86_64/gcc-4.4//x86_64-linux-gnu/bin/
-B/opt/x86_64/gcc-4.4//x86_64-linux-gnu/lib/ _floatdisf.3.i -o foo.o -v
Reading specs from /scratch/obj.x86_64/gcc-4.4/./gcc/specs
Target: x86_64-linux-gnu
Configured with: ../../src/gcc-4.4/configure -v --enable-languages=c
CFLAGS='-O0 -g3 -ggdb3 -finline-limit=1' CXXFLAGS='-O0 -g3 -ggdb3
-finline-limit=1' 'BOOT_CFLAGS=-O0 -g3 -ggdb3 -finline-limit=1'
'BOOT_CXXFLAGS=-O0 -g3 -ggdb3 -finline-limit=1' 'CFLAGS_FOR_TARGET=-O0 -g3
-ggdb3 -finline-limit=1' 'CXXFLAGS_FOR_TARGET=-O0 -g3 -ggdb3 -finline-limit=1'
--prefix=/opt/x86_64/gcc-4.4/ --enable-shared --with-system-zlib
--libexecdir=/opt/x86_64/gcc-4.4/lib --enable-nls --without-included-gettext
--enable-threads=posix --program-suffix=-4.4-HEAD --enable-__cxa_atexit
--enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug
--enable-mpfr --disable-werror --enable-checking=yes --enable-debug
--disable-multilib --disable-intermodule --with-gmp=/opt/x86_64/gmp-4.2.2/
--with-mpfr=/opt/x86_64/mpfr-2.3.0 x86_64-linux-gnu
Thread model: posix
gcc version 4.4.0 20080710 (experimental) [trunk revision 137693] (GCC) 
COLLECT_GCC_OPTIONS='-B/scratch/obj.x86_64/gcc-4.4/./gcc/'
'-B/opt/x86_64/gcc-4.4//x86_64-linux-gnu/bin/'
'-B/opt/x86_64/gcc-4.4//x86_64-linux-gnu/lib/' '-o' 'foo.o' '-v'
'-mtune=generic'
 /scratch/obj.x86_64/gcc-4.4/./gcc/cc1 -fpreprocessed _floatdisf.3.i -quiet
-dumpbase _floatdisf.3.i -mtune=generic -auxbase _floatdisf.3 -version -o
/tmp/ccGtWvPG.s
GNU C (GCC) version 4.4.0 20080710 (experimental) [trunk revision 137693]
(x86_64-linux-gnu)
compiled by GNU C version 4.3.1, GMP version 4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 447e9dc035427ea16ce8a65ef6b556b7
_floatdisf.3.i: In function ‘__floattisf’:
_floatdisf.3.i:9: error: unrecognizable insn:
(insn 44 43 45 2 _floatdisf.3.i:8 (parallel [
(set (reg:DI 1 dx [ D.1589+8 ])
(ashiftrt:SI (reg:DI 1 dx [ D.1589+8 ])
(const_int 31 [0x1f])))
(clobber (reg:CC 17 flags))
]) -1 (nil))
_floatdisf.3.i:9: internal compiler error: in extract_insn, at recog.c:1990


-- 
   Summary: ICE in extract_insn, at recog.c:1990
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code, build
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: aldot at gcc dot gnu dot org
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


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



[Bug regression/36787] New: Old value of global variable saved/restored between function call

2008-07-10 Thread lauren dot bedoule at gmail dot com
I looked at the assembler instructions surrounding the call to myFunc function;
They seemed to be erroneous under gcc 4.3, yet correct under gcc 4.1

Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.1-2'
--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
gcc version 4.3.1 (Debian 4.3.1-2)


Result under gcc version 4.3.1:
5

Result under gcc version 4.1.1-21 or 3.4.4:
7


-- 
   Summary: Old value of global variable saved/restored between
function call
   Product: gcc
   Version: 4.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: regression
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: lauren dot bedoule at gmail dot com


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



[Bug regression/36787] Old value of global variable saved/restored between function call

2008-07-10 Thread lauren dot bedoule at gmail dot com


--- Comment #1 from lauren dot bedoule at gmail dot com  2008-07-10 11:46 
---
Created an attachment (id=15886)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15886&action=view)
c code printing the erroneous result


-- 


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



[Bug regression/36787] Old value of global variable saved/restored between function call

2008-07-10 Thread lauren dot bedoule at gmail dot com


--- Comment #2 from lauren dot bedoule at gmail dot com  2008-07-10 11:53 
---
Created an attachment (id=15887)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15887&action=view)
preprocessed file


-- 


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



[Bug debug/36690] [4.3/4.4 Regression] .debug_line first line is behind the first instruction

2008-07-10 Thread jakub at gcc dot gnu dot org


--- Comment #3 from jakub at gcc dot gnu dot org  2008-07-10 12:01 ---
Created an attachment (id=15888)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15888&action=view)
gcc44-pr36690.patch

Unfinished patch which solves the testcase in this PR and a couple of other
problems, but still there are plenty of issues.

It adds goto_block field to edges, because sometimes an edge is the only place
that uses certain scope.  Consider say:
void bar (int);

void foo (int i)
{
  if (!i)
bar (0);
  else
{
  static int z = 5;
  goto f1;
}
  bar (1);
f1:
  bar (2);
}
At -O0 -g we really should be able to put breakpoint on goto f1 and see the z
variable.  Another testcase I've been playing with is:
void
bar (int i)
{
}

void
foo (int i, int j)
{
  if (j)
{
  bar (i + 1);
  goto f1;
}
  bar (i + 2);
  goto f2;
f1:
  if (i > 10)
goto f3;
f2:
  if (i > 40)
goto f4;
  else
goto f5;
f3:
  bar (i);
f4:
  bar (i);
f5:
  bar (i);
}

int
main (void)
{
  foo (0, 1);
  foo (11, 1);
  foo (21, 0);
  foo (41, 0);
  return 0;
}

Here IMNSHO at -O0 -g one should be able to step through all the gotos, so
there should be some instructions with the locations of the gotos.  With the
attached patch one goto gets a location in the assembly, but the rest don't. 
One problem
is that already the into_cfglayout pass does some optimizations I wouldn't
think are appropriate for -O0, like merging basic blocks.  That's e.g. where
the
goto_locus of goto f1; is gone.  Either we should prevent that kind of
optimization if (!optimize) and the edge has goto_locus, or e.g. could insert
a nop insn with goto_locus as INSN_LOCATOR and hope at -O0 nothing later on
optimizes that out.  Another problem is with the conditional branches.  For
them
I'm afraid we can't put goto_locus on the conditional jump.  If just one
edge has goto_locus and the other does not, at (!optimize) we could possibly
invert the condition and thus let the unconditional jump be the insn that
holds the goto_locus INSN_LOCATOR.  But for the case where both edges have
goto_locus, I think we should just insert an extra conditional jump, so that
there are two unconditional jumps, each with its goto_locus.


-- 


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



[Bug tree-optimization/36788] New: [4.4 Regression] ICE in loop_optimizer_init at -O3

2008-07-10 Thread janus at gcc dot gnu dot org
The attached code triggers an ICE when compiled with -O3:

internal compiler error: in loop_optimizer_init, at loop-init.c:46

-O2 works. This was first encountered in revision 137631. The test case is
already reduced from a much larger program, but still has 1000+ lines. I was
not able to reduce it further.


-- 
   Summary: [4.4 Regression] ICE in loop_optimizer_init at -O3
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janus at gcc dot gnu dot org


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



[Bug regression/36787] Old value of global variable saved/restored between function call

2008-07-10 Thread schwab at suse dot de


--- Comment #3 from schwab at suse dot de  2008-07-10 12:15 ---
  reg = reg + myFunc();

There is no sequence point between the operands of the plus operator, thus it
is unspecified which one is evaluated first.


-- 

schwab at suse dot de changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug tree-optimization/36788] [4.4 Regression] ICE in loop_optimizer_init at -O3

2008-07-10 Thread janus at gcc dot gnu dot org


--- Comment #1 from janus at gcc dot gnu dot org  2008-07-10 12:17 ---
Created an attachment (id=15889)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15889&action=view)
test case


-- 


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



[Bug c++/36789] New: internal compiler error: in expand_expr_real_1, at expr.c:6953

2008-07-10 Thread korusef at gmail dot com
When compiling incorrect code I got internal error.
The error in the code is the attempt to use non constant expression as template
argument.
Tried compiling the same code with different versions.

The output of $ g++ -v -save-temps delegate.cpp 2> delegate.2.log

Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.2 --program-suffix=-4.2
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr
--enable-targets=all --enable-checking=release --build=i486-linux-gnu
--host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
 /usr/lib/gcc/i486-linux-gnu/4.2.3/cc1plus -E -quiet -v -D_GNU_SOURCE
delegate.cpp -mtune=generic -fpch-preprocess -o delegate.ii
ignoring nonexistent directory "/usr/local/include/i486-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../i486-linux-gnu/include"
ignoring nonexistent directory "/usr/include/i486-linux-gnu"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.2
 /usr/include/c++/4.2/i486-linux-gnu
 /usr/include/c++/4.2/backward
 /usr/local/include
 /usr/lib/gcc/i486-linux-gnu/4.2.3/include
 /usr/include
End of search list.
 /usr/lib/gcc/i486-linux-gnu/4.2.3/cc1plus -fpreprocessed delegate.ii -quiet
-dumpbase delegate.cpp -mtune=generic -auxbase delegate -version
-fstack-protector -fstack-protector -o delegate.s
GNU C++ version 4.2.3 (Ubuntu 4.2.3-2ubuntu7) (i486-linux-gnu)
compiled by GNU C version 4.2.3 (Ubuntu 4.2.3-2ubuntu7).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129239
Compiler executable checksum: 9cf91ba46d80e564052e4fbab0d6561b
delegate.cpp: In function ‘void delegate(void*) [with T = A, void (T::*
fnc)() = fnc]’:
delegate.cpp:49: internal compiler error: in expand_expr_real_1, at expr.c:6953
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see .

3.3.6 version correctly ends with detecting error:

Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/specs
Configured with:
/var/tmp/portage/sys-devel/gcc-3.3.6-r1/work/gcc-3.3.6/configure --prefix=/usr
--bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.3.6
--includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.3.6/info
--with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include/g++-v3
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --enable-secureplt --disable-libunwind-exceptions
--disable-multilib --enable-java-awt=gtk --enable-objc-gc
--enable-languages=c,c++,java,objc,f77 --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu
Thread model: posix
gcc version 3.3.6 (Gentoo 3.3.6-r1, ssp-3.3.6-1.0, pie-8.7.8)
 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/cc1plus -E -D__GNUG__=3 -quiet -v
-D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=6 -D_GNU_SOURCE
delegate.cpp delegate.ii
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/libffi
 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include/g++-v3
 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include/g++-v3/i686-pc-linux-gnu
 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include/g++-v3/backward
 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/include
 /usr/include
End of search list.
 /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6/cc1plus -fpreprocessed delegate.ii
-quiet -dumpbase delegate.cpp -auxbase delegate -version -o delegate.s
GNU C++ version 3.3.6 (Gentoo 3.3.6-r1, ssp-3.3.6-1.0, pie-8.7.8)
(i686-pc-linux-gnu)
compiled by GNU C version 3.3.6 (Gentoo 3.3.6-r1, ssp-3.3.6-1.0,
pie-8.7.8).
GGC heuristics: --param ggc-min-expand=57 --param ggc-min-heapsize=51200
delegate.cpp: In function `void (* make_delegate(void (T::*)()))(void*) [with T 
   = A]':
delegate.cpp:66:   instantiated from here
delegate.cpp:55: error: `fnc' is not a valid template argument
delegate.cpp:55: error: it must be a pointer-to-member of the form `&X::Y'
delegate.cpp:55: error: `fnc' is not a valid template argument
delegate.cpp:55: error: it must be a pointer-to-member of the form `&X::Y'
delegate.cpp:55: error: no matches converting function `delegate' to type `void 
   (*)(void*)'
delegate.cpp:48: error: candidates are: template 
   void delegate(void*)

But version 4.1.2 doesn't d

[Bug c++/36789] internal compiler error: in expand_expr_real_1, at expr.c:6953

2008-07-10 Thread korusef at gmail dot com


--- Comment #1 from korusef at gmail dot com  2008-07-10 12:44 ---
Created an attachment (id=15890)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15890&action=view)
Source file with the problem


-- 


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



[Bug c++/36789] internal compiler error: in expand_expr_real_1, at expr.c:6953

2008-07-10 Thread korusef at gmail dot com


--- Comment #2 from korusef at gmail dot com  2008-07-10 12:45 ---
Created an attachment (id=15891)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15891&action=view)
Preprocessed result of the source file delegate.cpp


-- 


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



[Bug middle-end/36775] Incorrect code generated - value tested before it is set.

2008-07-10 Thread sfalco at harris dot com


--- Comment #8 from sfalco at harris dot com  2008-07-10 13:15 ---
Thanks, and sorry for the bogus report.

I'll pursue it with the authors of the e2fs utilities.


-- 


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



[Bug c++/36760] Simple std::bind use causes warnings with -Wextra

2008-07-10 Thread bangerth at dealii dot org


--- Comment #22 from bangerth at dealii dot org  2008-07-10 13:23 ---
(In reply to comment #21)
> > Two questions:
> > 1/ Is the text in the documentation that Dirk Mueller added in the last 
> > commit
> >of PR 30601 now wrong/outdated?
> 
> I don't know, I'm not a documentation expert, maybe some tweaks will be
> necessary but I may not be able to come to it in the near future, really quite
> a few things in my todo list these days, I'm sorry.

Reading through the current text, I think it is sufficiently vague for it
to remain as it is.


> > 2/ Does your patch also fix the testcase in PR 36052?
> 
> The warning is not emitted anymore, for sure.

Great, thanks a lot!
W.


-- 


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



[Bug middle-end/36753] [4.3/4.4 Regression] Forward propagation interacts badly with global register variable

2008-07-10 Thread jakub at gcc dot gnu dot org


--- Comment #6 from jakub at gcc dot gnu dot org  2008-07-10 13:34 ---
More self-contained testcase:
register unsigned long *r14 asm ("r14");
extern void abort (void);

__attribute__ ((noinline)) void
test (void)
{
  *++r14 = 31337;
}

int
main ()
{
  unsigned long stack[2];
  stack[0] = 0;
  stack[1] = 0;
  r14 = stack;
  test ();
  if (r14 != stack + 1 || *r14 != 31337)
abort ();
  return 0;
}

We have:
(insn 5 2 6 2 pr36753.c:7 (parallel [
(set (reg/f:DI 58 [ r14.1 ])
(plus:DI (reg/v:DI 43 r14 [ r14 ])
(const_int 8 [0x8])))
(clobber (reg:CC 17 flags))
]) 279 {*adddi_1_rex64} (expr_list:REG_DEAD (reg/v:DI 43 r14 [ r14 ])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil

(insn 6 5 7 2 pr36753.c:7 (set (reg/v:DI 43 r14 [ r14 ])
(reg/f:DI 58 [ r14.1 ])) 89 {*movdi_1_rex64} (nil))

(insn 7 6 0 2 pr36753.c:7 (set (mem:DI (reg/f:DI 58 [ r14.1 ]) [2 S8 A64])
(const_int 31337 [0x7a69])) 89 {*movdi_1_rex64} (expr_list:REG_DEAD
(reg/f:DI 58 [ r14.1 ])
(nil)))

before fwprop2, and:
In insn 7, replacing
 (mem:DI (reg/f:DI 58 [ r14.1 ]) [2 S8 A64])
 with (mem:DI (plus:DI (reg/v:DI 43 r14 [ r14 ])
(const_int 8 [0x8])) [2 S8 A64])
Changed insn 7

Wonder why nothing in fwprop.c checks modified_between_p, that would clearly
say that reg:DI 43 r14 has been modified between the setter and use and thus
the propagation is invalid.

To Andrew: many ABIs have one or more fixed registers reserved, so you can
use those as global register vars, or you can e.g. build with -ffixed-* to make
sure even when you don't have the global register var declaration in some CU,
it isn't randomly clobbered.  Many projects rely heavily on global register
vars,
including the Linux kernel or e.g. glibc (in the latter it is used in
libpthread
for all thread specific stuff).  From what I see, this fwprop bug isn't
specific
to global register vars, any REG, be it hard or pseudo, can be modified between
the setter and user...


-- 


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



[Bug middle-end/30774] [4.2/4.3/4.4 regression] ld: fatal: too many symbols require `small' PIC references

2008-07-10 Thread jakub at gcc dot gnu dot org


--- Comment #5 from jakub at gcc dot gnu dot org  2008-07-10 13:40 ---
The generated testcases actually changed, several times, so I fail to see
where is a bug.  Unless you compare the exactly same source between two
compilers
and one hits the ceiling for -fpic and one doesn't, there is no bug.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING


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



[Bug c++/36633] [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-10 Thread chris dot fairles at gmail dot com


--- Comment #11 from chris dot fairles at gmail dot com  2008-07-10 13:41 
---
On x64_64, alignof(smart_ptr) == sizeof(size_t) == 8. So then the size of the
array is stored in the 8 bytes prior to the address of the returned pointer
from new[]. 

In the delete[] call, its offsetting the returned address by 8 which is correct
no? So isn't this a bogus warning?

Chris


-- 


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



[Bug rtl-optimization/36419] [4.3/4.4 Regression] Wrong unwind info with -Os -fasynchronous-unwind-tables

2008-07-10 Thread jakub at gcc dot gnu dot org


--- Comment #16 from jakub at gcc dot gnu dot org  2008-07-10 13:41 ---
1) and 2) fixed now, 3) still unfixed.


-- 


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



[Bug debug/36690] [4.3/4.4 Regression] .debug_line first line is behind the first instruction

2008-07-10 Thread hubicka at ucw dot cz


--- Comment #4 from hubicka at ucw dot cz  2008-07-10 13:43 ---
Subject: Re:  [4.3/4.4 Regression] .debug_line first line is behind the first
instruction

> One problem
> is that already the into_cfglayout pass does some optimizations I wouldn't
> think are appropriate for -O0, like merging basic blocks.  That's e.g. where
> the

Yes, this is long lasting problem.  Basically even at -O0 we can
elliminate some of user code completely, while in theory we probably
ought to maintain even stuff like empty statements.

I am not big friend of idea of making edges sort of "abnormal" ie blocks
unmergeable just to preserve debug info.  I guess making -O0 to not
elliminate NOP instruction and merge block to insert one when last
instruction of former block is not having same locator is better way
to go given that there are more general problems like this.  On tree
level we will likely need something similar (ie empty statements holding
as placeholders).
> goto_locus of goto f1; is gone.  Either we should prevent that kind of
> optimization if (!optimize) and the edge has goto_locus, or e.g. could insert
> a nop insn with goto_locus as INSN_LOCATOR and hope at -O0 nothing later on
> optimizes that out.  Another problem is with the conditional branches.  For
> them
> I'm afraid we can't put goto_locus on the conditional jump.  If just one
> edge has goto_locus and the other does not, at (!optimize) we could possibly
> invert the condition and thus let the unconditional jump be the insn that
> holds the goto_locus INSN_LOCATOR.  But for the case where both edges have
> goto_locus, I think we should just insert an extra conditional jump, so that
> there are two unconditional jumps, each with its goto_locus.

Gimplifier already ought to do COND expr jumping to GOTO expr since I
run into this problem in gcov output. There is code in cfgcleanup
preventing forwarding the edges before gcoving is done.  Later we
forward across the forwarder block that is probably optimiztion we need
to disable at O0 if we worry about this (ie forward across forwarder
block only if the forwarders block edge is having no locator or same
locator as the edge we are forwarding).

Honza
> 
> 
> -- 
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36690
> 
> --- You are receiving this mail because: ---
> You are on the CC list for the bug, or are watching someone who is.


-- 


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



[Bug c++/36633] [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-10 Thread paolo dot carlini at oracle dot com


--- Comment #12 from paolo dot carlini at oracle dot com  2008-07-10 13:53 
---
The warning is bogus, for sure. The issue is how / where to fix it. Apparently
it comes from check_array_ref in tree-vrp.c, outside the C++ front-end indeed.
First thing, we should probably figure out what is exactly happening at -O2 vs
-O1 and study a bit the code around that check_array_ref call in the
debugger... Anyway, if we are coming to believe that the issue isn't a
front-end one, maybe Richard can help...


-- 


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



[Bug tree-optimization/35642] [4.4 Regression] short * short multiplication not vectorized on Power

2008-07-10 Thread bonzini at gnu dot org


--- Comment #17 from bonzini at gnu dot org  2008-07-10 14:05 ---
changing subject then, thanks for the analysis!


-- 

bonzini at gnu dot org changed:

   What|Removed |Added

Summary|[4.4 Regression] heisenbug  |[4.4 Regression] short *
   |in tree vectorizer  |short multiplication not
   ||vectorized on Power


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



[Bug c++/36633] [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-10 Thread rguenther at suse dot de


--- Comment #13 from rguenther at suse dot de  2008-07-10 14:07 ---
Subject: Re:  [4.4 regression] warning "array subscript is
 below array bounds" on delete [] with -O2, -Wall

On Thu, 10 Jul 2008, paolo dot carlini at oracle dot com wrote:

> --- Comment #12 from paolo dot carlini at oracle dot com  2008-07-10 
> 13:53 ---
> The warning is bogus, for sure. The issue is how / where to fix it. Apparently
> it comes from check_array_ref in tree-vrp.c, outside the C++ front-end indeed.
> First thing, we should probably figure out what is exactly happening at -O2 vs
> -O1 and study a bit the code around that check_array_ref call in the
> debugger... Anyway, if we are coming to believe that the issue isn't a
> front-end one, maybe Richard can help...

Can the FE mark this array-access with TREE_NO_WARNING?  Or is it not
in array_ref form?

Richard.


-- 


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



[Bug c/36790] New: ICE on valid code: OpenMP task construct with default(shared) clause

2008-07-10 Thread singler at gcc dot gnu dot org
ICE on the following code. When removing "default(shared)", it compiles fine.

void foo(bool b)
{
}

void tasked_foo(bool b)
{
  foo(b);
  #pragma omp task default(shared)
b = false;
}

int main()
{
  tasked_foo(false);
  return 0;
}


g++ -fopenmp task_default_shared.cpp
task_default_shared.cpp: In function ‘void tasked_foo(bool)’:
task_default_shared.cpp:16: error: invalid operand to unary operator
b

task_default_shared.cpp:16: note: in statement
D.2064 = (int) b;

task_default_shared.cpp:16: internal compiler error: verify_stmts failed


BTW: What "component" should I select for this type of bug? "c++" or "libgomp"
or still something different?


-- 
   Summary: ICE on valid code: OpenMP task construct with
default(shared) clause
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: singler at gcc dot gnu dot org
 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=36790



[Bug target/36736] [4.3 Regression] gfortran unrecognizable insn on sh4

2008-07-10 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.3.2


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



[Bug target/36780] [4.3/4.4 Regression] Wrong reload generated for subreg address on SH

2008-07-10 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.3.2


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



[Bug tree-optimization/36630] [4.3/4.4 Regression] ICE in vect_update_ivs_after_vectorizer

2008-07-10 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P2


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



[Bug tree-optimization/36631] [4.3/4.4 Regression] attribute always_inline -> sorry, unimplemented: recursive inlining

2008-07-10 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2008-07-10 14:23 ---
Confirmed.  Honza, can you have a look here?


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
  Component|c++ |tree-optimization
 Ever Confirmed|0   |1
  Known to fail||4.3.1
  Known to work||4.2.4
   Priority|P3  |P2
   Last reconfirmed|-00-00 00:00:00 |2008-07-10 14:23:16
   date||


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



[Bug c++/36741] [4.3/4.4 regression] Bogus "large integer implicitly truncated" passing size_t constant to new

2008-07-10 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2008-07-10 14:24 ---
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Priority|P3  |P2
   Last reconfirmed|-00-00 00:00:00 |2008-07-10 14:24:55
   date||


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



[Bug middle-end/36753] [4.3/4.4 Regression] Forward propagation interacts badly with global register variable

2008-07-10 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P1


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



[Bug tree-optimization/36646] [4.3/4.4 Regression] Unnecessary moves generated on loop boundaries

2008-07-10 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P2
Summary|[4.3/4.4 regression]|[4.3/4.4 Regression]
   |Unnecessary moves generated |Unnecessary moves generated
   |on loop boundaries  |on loop boundaries


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



[Bug debug/36690] [4.3/4.4 Regression] .debug_line first line is behind the first instruction

2008-07-10 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P2


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



[Bug middle-end/36790] ICE on valid code: OpenMP task construct with default(shared) clause

2008-07-10 Thread jakub at gcc dot gnu dot org


--- Comment #1 from jakub at gcc dot gnu dot org  2008-07-10 14:28 ---
Compiler bugs shouldn't be using libgomp component.  As this ICEs with both
C and C++ frontends, it should be middle-end.
BTW, for all OpenMP bugs please add openmp keyword to Keywords, thanks.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
  Component|c   |middle-end
 Ever Confirmed|0   |1
   Keywords||openmp
   Last reconfirmed|-00-00 00:00:00 |2008-07-10 14:28:46
   date||


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



[Bug middle-end/36691] [4.2/4.3/4.4 Regression] wrong value left in induction variable

2008-07-10 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2008-07-10 14:29 ---
Sebastian, I think this is one for you ... ;)


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P1


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



[Bug middle-end/36767] [4.3/4.4 Regression] Segmentation fault with -fprofile-arcs -O2

2008-07-10 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

  Component|c++ |middle-end
  Known to fail||4.3.1
  Known to work||4.2.4
   Priority|P3  |P1


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



[Bug c++/13101] incorrect warning on initialized extern const function pointer

2008-07-10 Thread dodji at gcc dot gnu dot org


-- 

dodji at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dodji at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2005-12-18 20:24:46 |2008-07-10 14:30:32
   date||


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



[Bug target/36736] [4.3 Regression] gfortran unrecognizable insn on sh4

2008-07-10 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P4


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



[Bug target/36780] [4.3/4.4 Regression] Wrong reload generated for subreg address on SH

2008-07-10 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P4


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



[Bug target/33637] [4.2/4.3/4.4 Regression] "checking for nm: test: too many arguments" causes "Undefined symbol: __gxx_personality_v0"

2008-07-10 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Keywords||build
   Priority|P3  |P4


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



[Bug tree-optimization/36788] [4.4 Regression] ICE in loop_optimizer_init at -O3

2008-07-10 Thread ebotcazou at gcc dot gnu dot org


--- Comment #2 from ebotcazou at gcc dot gnu dot org  2008-07-10 14:33 
---
FWIW we're observing the same ICE on Ada code.


-- 

ebotcazou at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||dberlin at gcc dot gnu dot
   ||org, ebotcazou at gcc dot
   ||gnu dot org


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



[Bug other/31754] Include column number along line in error messages main.cpp:5:38

2008-07-10 Thread dodji at gcc dot gnu dot org


-- 

dodji at gcc dot gnu dot org changed:

   What|Removed |Added

 CC|dseketel at redhat dot com  |
 AssignedTo|unassigned at gcc dot gnu   |dodji at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2007-10-26 05:35:43 |2008-07-10 14:37:28
   date||


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



[Bug middle-end/36791] New: ICE with constant argument to __builtin_eh_return

2008-07-10 Thread jfc at mit dot edu
This function causes an ICE in rtl generation:

void g()
{
  __builtin_eh_return(0, 0);
}

The crash happens when either operand to __builtin_eh_return is an integer
constant.  expand_builtin_eh_return calls copy_to_reg on a CONST_INT operand. 
copy_to_reg generates a register with mode VOIDmode.

I think the fix is to change the two calls to copy_to_reg to copy_addr_to_reg
in expand_builtin_eh_return.

This bug seems to be present for many versions and on at least two targets, x86
and SPARC.

Note that with optimization on the same crash may occur if a variable known to
hold an integer constant value is passed as the first argument.


-- 
   Summary: ICE with constant argument to __builtin_eh_return
   Product: gcc
   Version: 4.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jfc at mit dot edu
  GCC host triplet: x86_64-linux-gnu


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



[Bug tree-optimization/36792] New: [4.4 Regression] Revision 137631 causes many failures

2008-07-10 Thread hjl dot tools at gmail dot com
Revision 137631:

http://gcc.gnu.org/ml/gcc-patches/2008-07/msg00430.html

may have caused

FAIL: gcc.dg/tree-ssa/data-dep-1.c scan-tree-dump-times ltrans "4, \\+, 1" 0
FAIL: gcc.dg/tree-ssa/ssa-fre-13.c scan-tree-dump fre "Inserted .* &a"
FAIL: gcc.dg/tree-ssa/ssa-fre-13.c scan-tree-dump fre "Replaced
tmp1_.\\(D\\)->data"
FAIL: gcc.dg/tree-ssa/ssa-fre-14.c scan-tree-dump fre "Inserted .* &a"
FAIL: gcc.dg/tree-ssa/ssa-fre-14.c scan-tree-dump fre "Replaced tmp1.data"
FAIL: gcc.dg/tree-ssa/ssa-fre-7.c scan-tree-dump-times fre "Inserted pretmp" 1
FAIL: gcc.dg/tree-ssa/ssa-fre-7.c scan-tree-dump-times fre "Replaced a.u.f with
pretmp" 3
FAIL: gcc.dg/tree-ssa/ssa-fre-7.c scan-tree-dump-times fre "Replaced a.u.k with
j" 1
FAIL: gcc.dg/tree-ssa/ssa-fre-7.c scan-tree-dump fre "=
VIEW_CONVERT_EXPR\\(j_"
FAIL: gcc.dg/tree-ssa/ssa-fre-7.c scan-tree-dump optimized "return j"
FAIL: gcc.dg/tree-ssa/ssa-fre-8.c scan-tree-dump-times fre "Replaced u.f with
pretmp" 2
FAIL: gcc.dg/tree-ssa/ssa-fre-8.c scan-tree-dump-times fre "Inserted pretmp" 2
FAIL: gcc.dg/tree-ssa/ssa-fre-9.c scan-tree-dump-times fre "Eliminated: 1" 2
FAIL: gcc.dg/tree-ssa/ssa-fre-9.c scan-tree-dump-times fre "Insertions: 1" 2
FAIL: gcc.dg/tree-ssa/ssa-pre-15.c scan-tree-dump optimized "= 0;"
FAIL: gcc.dg/vect/vect-67.c scan-tree-dump-times vect "vectorized 1 loops" 1
FAIL: gcc.dg/vect/no-scevccp-outer-13.c scan-tree-dump-times vect "OUTER LOOP
VECTORIZED." 1
FAIL: gcc.dg/vect/no-scevccp-outer-7.c scan-tree-dump-times vect "OUTER LOOP
VECTORIZED." 1
FAIL: Array_3 -O3 execution - source compiled test
FAIL: Array_3 -O3 -findirect-dispatch execution - source compiled test
FAIL: 23_containers/vector/check_construct_destroy.cc (test for excess errors)
FAIL: ext/pb_ds/regression/trie_no_data_map_rand.cc execution test


-- 
   Summary: [4.4 Regression] Revision 137631 causes many failures
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com


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



[Bug rtl-optimization/36419] [4.3/4.4 Regression] Wrong unwind info with -Os -fasynchronous-unwind-tables

2008-07-10 Thread ebotcazou at gcc dot gnu dot org


--- Comment #17 from ebotcazou at gcc dot gnu dot org  2008-07-10 14:48 
---
> 1) and 2) fixed now, 3) still unfixed.

I presume that 3) is not just a problem with the CFIs generated in final.c,
rather a problem in the code itself, right?


-- 

ebotcazou at gcc dot gnu dot org changed:

   What|Removed |Added

 CC|ebotcazou at libertysurf dot|ebotcazou at gcc dot gnu dot
   |fr  |org


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



[Bug c++/36633] [4.4 regression] warning "array subscript is below array bounds" on delete [] with -O2, -Wall

2008-07-10 Thread mark at codesourcery dot com


--- Comment #14 from mark at codesourcery dot com  2008-07-10 14:58 ---
Subject: Re:  [4.4 regression] warning "array subscript is
 below array bounds" on delete [] with -O2, -Wall

rguenther at suse dot de wrote:

> Can the FE mark this array-access with TREE_NO_WARNING?  Or is it not
> in array_ref form?

In general, the FE cannot do that; the array might have (say) 128-byte 
elements, but there will still only be (say) 8 bytes for the cookie.


-- 


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



[Bug tree-optimization/36792] [4.4 Regression] Revision 137631 causes many failures

2008-07-10 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2008-07-10 14:59 ---
Confirmed.  I'll address the fre stuff.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||missed-optimization
   Last reconfirmed|-00-00 00:00:00 |2008-07-10 14:59:59
   date||
   Target Milestone|--- |4.4.0


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



[Bug tree-optimization/36788] [4.4 Regression] ICE in loop_optimizer_init at -O3

2008-07-10 Thread dberlin at gcc dot gnu dot org


--- Comment #3 from dberlin at gcc dot gnu dot org  2008-07-10 15:01 ---
We need to call loop_optimizer_finalize on the early exit from PRE case.


-- 


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



[Bug target/36793] New: x86-64 does not get __sync_synchronize right

2008-07-10 Thread jfc at mit dot edu
As I understand __sync_synchronize, the intent is to emit a memory barrier
instruction, at least on multiprocessor systems.  Currently on x86
__sync_synchronize inhibits explicit code motion across the builtin function
call but not processor reordering of memory operations across the builtin
function call.

I think mfence is the right instruction on x86-64, and this or a similar
pattern should be added to sync.md:

(define_insn "memory_barrier"
  [(unspec_volatile [(const_int 0)] UNSPEC_MFENCE)]
  "TARGET_SSE2"
  "mfence")


-- 
   Summary: x86-64 does not get __sync_synchronize right
   Product: gcc
   Version: 4.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jfc at mit dot edu
 GCC build triplet: x86_64-linux-gnu
  GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu


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



[Bug middle-end/36791] ICE with constant argument to __builtin_eh_return

2008-07-10 Thread jfc at mit dot edu


-- 

jfc at mit dot edu changed:

   What|Removed |Added

   Severity|normal  |minor


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



[Bug middle-end/36790] ICE on valid code: OpenMP task construct with default(shared) clause

2008-07-10 Thread jakub at gcc dot gnu dot org


--- Comment #2 from jakub at gcc dot gnu dot org  2008-07-10 15:23 ---
Subject: Bug 36790

Author: jakub
Date: Thu Jul 10 15:22:50 2008
New Revision: 137695

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137695
Log:
PR middle-end/36790
* omp-low.c (lower_omp_2): If task_shared_vars, test all DECL_P
uids in the bitmap, not just VAR_DECL uids.

* gcc.dg/gomp/pr36790.c: New test.
* g++.dg/gomp/pr36790.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/gomp/pr36790.C
trunk/gcc/testsuite/gcc.dg/gomp/pr36790.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/omp-low.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug middle-end/36790] ICE on valid code: OpenMP task construct with default(shared) clause

2008-07-10 Thread jakub at gcc dot gnu dot org


--- Comment #3 from jakub at gcc dot gnu dot org  2008-07-10 15:26 ---
Fixed, thanks for the bugreport.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug bootstrap/36783] Build fails in stagefeedback-bubble make target on IRIX 6.5.30 when compiling insn-attrtab.c

2008-07-10 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2008-07-10 17:07 ---
Yes don't use make profiledbootstrap.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|major   |normal


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



[Bug c++/36794] New: Internal compiler error: Segmentation fault, when incorrectly using __attribute__ ((packed))

2008-07-10 Thread vanco dot gccbugzilla at vancomaja dot com
A funny use of __attribute__ ((packed)) caused a seg fault. 
Code: 
== (see attachment for full preprocessed file)
struct wrap_a {int a;};
struct wrap_b {long b;}; // note: 64bit machine
typedef std::pair my_pair; // crash!
==
Command line: 
g++ /tmp/g++bug.cc
==
Output: 
/tmp/g++bug.cc: In function ‘int main()’:
/tmp/g++bug.cc:11: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccklpUdO.out file, please attach this to
your bugreport.


-- 
   Summary: Internal compiler error: Segmentation fault, when
incorrectly using __attribute__ ((packed))
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vanco dot gccbugzilla at vancomaja dot com
 GCC build triplet: Configured with: ../configure --prefix=/usr --
mandir=/usr/share/
  GCC host triplet: Using built-in specs
GCC target triplet: x86_64-redhat-linux


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



[Bug c++/36794] Internal compiler error: Segmentation fault, when incorrectly using __attribute__ ((packed))

2008-07-10 Thread vanco dot gccbugzilla at vancomaja dot com


--- Comment #1 from vanco dot gccbugzilla at vancomaja dot com  2008-07-10 
17:33 ---
Created an attachment (id=15892)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15892&action=view)
Preprocessed source


-- 


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



[Bug c++/36794] Internal compiler error: Segmentation fault, when incorrectly using __attribute__ ((packed))

2008-07-10 Thread vanco dot gccbugzilla at vancomaja dot com


--- Comment #2 from vanco dot gccbugzilla at vancomaja dot com  2008-07-10 
17:34 ---
g++ -v output: 
==Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-libgcj-multifile
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic
--host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)


-- 

vanco dot gccbugzilla at vancomaja dot com changed:

   What|Removed |Added

  GCC build triplet|Configured with:|x86_64-redhat-linux
   |../configure --prefix=/usr -|
   |-mandir=/usr/share/ |
   GCC host triplet|Using built-in specs|x86_64-redhat-linux
Summary|Internal compiler error:|Internal compiler error:
   |Segmentation fault, when|Segmentation fault, when
   |incorrectly using   |incorrectly using
   |__attribute__ ((packed))|__attribute__ ((packed))


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



[Bug tree-optimization/26854] Inordinate compile times on large routines

2008-07-10 Thread lucier at math dot purdue dot edu


--- Comment #70 from lucier at math dot purdue dot edu  2008-07-10 17:36 
---
Created an attachment (id=15893)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15893&action=view)
detailed memory stats for trunk revision 137644

These are the detailed memory stats for

euler-11% /pkgs/gcc-mainline/bin/gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../../mainline/configure --enable-checking=release
--with-gmp=/pkgs/gmp-4.2.2/ --with-mpfr=/pkgs/gmp-4.2.2/
--prefix=/pkgs/gcc-mainline --enable-languages=c
--enable-gather-detailed-mem-stats
Thread model: posix
gcc version 4.4.0 20080708 (experimental) [trunk revision 137644] (GCC) 

applied to this problem, with command line

/pkgs/gcc-mainline/bin/gcc -Wall -W -Wno-unused -O1 -fno-math-errno
-fschedule-insns2 -fno-trapping-math -fno-strict-aliasing -fwrapv
-fomit-frame-pointer -fPIC -ftime-report -fmem-report -c all.i >&
mainline-stats-O3

The run time isn't so bad, but the memory usage still peaks at 7.3 gigs.

Now that distributions have started shipping 4.2.whatever (Ubuntu 8.04 ships
4.2.3), this problem is showing up more an more as a regression against
previous releases of gcc.


-- 


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



[Bug tree-optimization/26854] Inordinate compile times on large routines

2008-07-10 Thread lucier at math dot purdue dot edu


--- Comment #71 from lucier at math dot purdue dot edu  2008-07-10 17:44 
---
Here are additional informal comparisons of 4.2.3 with Apple's 4.0.1 and gcc
3.4.5 on mingw:

https://webmail.iro.umontreal.ca/pipermail/gambit-list/2008-July/002450.html


-- 


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



[Bug target/36780] [4.3/4.4 Regression] Wrong reload generated for subreg address on SH

2008-07-10 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org, jsm28 at gcc dot gnu
   ||dot org
   Severity|normal  |major


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



[Bug c++/36794] Internal compiler error: Segmentation fault, when incorrectly using __attribute__ ((packed))

2008-07-10 Thread pinskia at gcc dot gnu dot org


--- Comment #3 from pinskia at gcc dot gnu dot org  2008-07-10 18:26 ---
>See http://bugzilla.redhat.com/bugzilla> for instructions.

Is there a reason why you filed this bug with us when you are using a modified
GCC from redhat?


-- 


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



[Bug tree-optimization/26854] Inordinate compile times on large routines

2008-07-10 Thread rguenth at gcc dot gnu dot org


--- Comment #72 from rguenth at gcc dot gnu dot org  2008-07-10 19:37 
---
The memory counters for DF even overflow ;)


-- 


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



[Bug tree-optimization/26854] Inordinate compile times on large routines

2008-07-10 Thread zadeck at naturalbridge dot com


--- Comment #73 from zadeck at naturalbridge dot com  2008-07-10 19:40 
---
Subject: Re:  Inordinate compile times on large
 routines

rguenth at gcc dot gnu dot org wrote:
> --- Comment #72 from rguenth at gcc dot gnu dot org  2008-07-10 19:37 
> ---
> The memory counters for DF even overflow ;)
>
>
>   
we have our best people working on it.  this is what fuds are supposed 
to fix.

kenny


-- 


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



[Bug fortran/36795] New: crash with character allocatable array argument

2008-07-10 Thread vivekrao4 at yahoo dot com
For the code

program main
implicit none
character (len=10), allocatable :: xx(:)
character (len=10)  :: yy
print*,"(5)"
allocate (xx(1))
xx(1)  = "dog"
call foo((xx),xx)
contains
subroutine foo(xx,yy)
character (len=*), intent(in)   :: xx(:)
character (len=*), intent(out), allocatable :: yy(:)
allocate (yy(size(xx)))
yy = xx
end subroutine foo
end program main

the program compiled by gfortran with the default options crashes at run time
with a pop-up box saying "An unhandled win32 exception occurred in a.exe
[55596]"

gfortran -v says

Using built-in specs.
Target: i586-pc-mingw32
Configured with: ../trunk/configure --prefix=/mingw
--enable-languages=c,fortran --with-gmp=/home/FX/local --with-ld=/mingw/bin/ld
--with-as=/mingw/bin/as --disable-werror --enable-bootstrap --enable-threads
--disable-nls --build=i586-pc-mingw32 --enable-libgomp --disable-shared
Thread model: win32
gcc version 4.4.0 20080603 (experimental) [trunk revision 136333] (GCC)


-- 
   Summary: crash with character allocatable array argument
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vivekrao4 at yahoo dot com


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



[Bug c++/36794] Internal compiler error: Segmentation fault, when incorrectly using __attribute__ ((packed))

2008-07-10 Thread vanco dot gccbugzilla at vancomaja dot com


--- Comment #4 from vanco dot gccbugzilla at vancomaja dot com  2008-07-10 
20:10 ---
(In reply to comment #3)
> >See http://bugzilla.redhat.com/bugzilla> for instructions.
> 
> Is there a reason why you filed this bug with us when you are using a modified
> GCC from redhat?
> 

None. I just thought this is the proper place to file it. 

Please feel free to ignore this problem - it's just something that I noticed
while I was playing with __attribute__ ((packed)). 


-- 


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



[Bug middle-end/36691] [4.2/4.3/4.4 Regression] wrong value left in induction variable

2008-07-10 Thread spop at gcc dot gnu dot org


--- Comment #4 from spop at gcc dot gnu dot org  2008-07-10 20:26 ---
Okay, I'll have a look at it.  Thanks for pointing me to it.


-- 

spop at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |spop at gcc dot gnu dot org
   |dot org |
 Status|NEW |ASSIGNED
   Last reconfirmed|2008-07-02 09:36:54 |2008-07-10 20:26:41
   date||


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



[Bug c++/36796] New: Support c++ override keyword

2008-07-10 Thread slime at apple dot com
I've seen references on the web to an "override" keyword that allows the
compiler to check method signatures are the same where intended, ie. instead of
creating a new virtual function when a subclasses override method no longer
matches the superclass. (Microsoft compilers.)  This would be a very good api
enhancement.

http://msdn.microsoft.com/en-us/library/41w3sh1c.aspx

eg.:

struct I1 {
   virtual void f();
};

struct X : public I1 {
   virtual void f() override {}
};


-- 
   Summary: Support c++ override keyword
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: slime at apple dot com


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



[Bug c++/36794] Internal compiler error: Segmentation fault, when incorrectly using __attribute__ ((packed))

2008-07-10 Thread brian at dessent dot net


--- Comment #5 from brian at dessent dot net  2008-07-10 21:06 ---
Subject: Re:  Internal compiler error: Segmentation fault, when 
 incorrectly using __attribute__ ((packed))


> None. I just thought this is the proper place to file it.
> 
> Please feel free to ignore this problem - it's just something that I noticed
> while I was playing with __attribute__ ((packed)).

This is the place to report it if you can reproduce it with stock gcc. 
What Andrew is saying is that Redhat adds an unknown amount of changes
to their gcc which is why they also change the bug reporting location
string from gcc bugzilla to their own Redhat bugzilla.  You can't expect
gcc developers to be interested in tracking down bugs in a gcc modified
with somebody else's random patches.


-- 


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



[Bug c++/36797] New: ICE on SFINAE and __is_empty

2008-07-10 Thread sebor at roguewave dot com
gcc 4.3.0 crashes compiling the program below:

$ cat z.C && g++ z.C
template  struct A { };
template  struct B;
template  struct B { typedef T X; };

template 
int foo (typename B::X* = 0) { return 0; }

template 
int foo (typename B::X* = 0) { return 1; }

int main ()
{
foo >();
}
z.C: In function ‘int foo(typename B::X*) [with T = A<0>]’:
z.C:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


-- 
   Summary: ICE on SFINAE and __is_empty
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sebor at roguewave dot com


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



[Bug middle-end/29056] gcc.target/powerpc/ppc-negeq0-1.c fails on powerpc64

2008-07-10 Thread jsm28 at gcc dot gnu dot org


--- Comment #7 from jsm28 at gcc dot gnu dot org  2008-07-10 22:01 ---
Subject: Bug 29056

Author: jsm28
Date: Thu Jul 10 22:00:53 2008
New Revision: 137704

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=137704
Log:
PR middle-end/29056
* gcc.target/powerpc/ppc-negeq0-1.c: Use long instead of int.
Adjust shift and scan-assembler-not pattern to allow for 64-bit
case.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/powerpc/ppc-negeq0-1.c


-- 


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



[Bug testsuite/29056] gcc.target/powerpc/ppc-negeq0-1.c fails on powerpc64

2008-07-10 Thread jsm28 at gcc dot gnu dot org


--- Comment #8 from jsm28 at gcc dot gnu dot org  2008-07-10 22:02 ---
Testcase now fixed on trunk.


-- 

jsm28 at gcc dot gnu dot org changed:

   What|Removed |Added

  Component|middle-end  |testsuite
   Target Milestone|--- |4.4.0


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



[Bug testsuite/29056] gcc.target/powerpc/ppc-negeq0-1.c fails on powerpc64

2008-07-10 Thread jsm28 at gcc dot gnu dot org


--- Comment #9 from jsm28 at gcc dot gnu dot org  2008-07-10 22:02 ---
Fixed.


-- 

jsm28 at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug target/36798] New: /usr/include/mmintrin.h: In function 'pix_multiply':

2008-07-10 Thread gfan at sta dot samsung dot com
[sbox-i780_411: /usr/work/gtk/pixman-0.10.0/pixman] > gcc -v -save-temps
-DHAVE_CONFIG_H -I. -I.. -g -O2 -Wall -fvisibility=hidden -c pixman-mmx.c 
-fPIC -DPIC -o pixman-mmx.o
Using built-in specs.
Reading specs from /scratchbox/compilers/arm-linux-4.1.1/gcc.specs
rename spec cpp to old_cpp
Target: arm-iwmmxt-linux-gnueabi
Configured with:
/home1/bridge/toolchain/crosstool/toolchain-2007-03-19/build/arm-iwmmxt-linux-gnueabi/gcc-4.1.1-glibc-2.5/gcc-4.1.1/configure
--target=arm-iwmmxt-linux-gnueabi --host=i686-host_pc-linux-gnu
--prefix=/usr/local/bridge/arm-iwmmxt-linux-gnueabi --with-cpu=iwmmxt
--with-float=soft --enable-cxx-flags=-msoft-float
--with-headers=/usr/local/bridge/arm-iwmmxt-linux-gnueabi/arm-iwmmxt-linux-gnueabi/include
--with-local-prefix=/usr/local/bridge/arm-iwmmxt-linux-gnueabi/arm-iwmmxt-linux-gnueabi
--disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit
--enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 4.1.1

/scratchbox/compilers/arm-linux-4.1.1/bin/../libexec/gcc/arm-iwmmxt-linux-gnueabi/4.1.1/cc1
-E -quiet -v -I. -I.. -iprefix
/scratchbox/compilers/arm-linux-4.1.1/bin/../lib/gcc/arm-iwmmxt-linux-gnueabi/4.1.1/
-isystem /usr/local/include -isystem /usr/include -DHAVE_CONFIG_H -DPIC
pixman-mmx.c -mcpu=iwmmxt -mfloat-abi=soft -Wall -fvisibility=hidden -fPIC
-fworking-directory -O2 -fpch-preprocess -o pixman-mmx.i
ignoring nonexistent directory
"/usr/local/bridge/arm-iwmmxt-linux-gnueabi/lib/gcc/arm-iwmmxt-linux-gnueabi/4.1.1/include"
ignoring nonexistent directory
"/usr/local/bridge/arm-iwmmxt-linux-gnueabi/arm-iwmmxt-linux-gnueabi/sys-include"
ignoring nonexistent directory
"/usr/local/bridge/arm-iwmmxt-linux-gnueabi/arm-iwmmxt-linux-gnueabi/include"
#include "..." search starts here:
#include <...> search starts here:
 .
 ..
 /usr/local/include
 /usr/include

/scratchbox/compilers/arm-linux-4.1.1/bin/../lib/gcc/arm-iwmmxt-linux-gnueabi/4.1.1/include

/scratchbox/compilers/arm-linux-4.1.1/bin/../lib/gcc/arm-iwmmxt-linux-gnueabi/4.1.1/../../../../arm-iwmmxt-linux-gnueabi/sys-include

/scratchbox/compilers/arm-linux-4.1.1/bin/../lib/gcc/arm-iwmmxt-linux-gnueabi/4.1.1/../../../../arm-iwmmxt-linux-gnueabi/include
End of search list.

/scratchbox/compilers/arm-linux-4.1.1/bin/../libexec/gcc/arm-iwmmxt-linux-gnueabi/4.1.1/cc1
-fpreprocessed pixman-mmx.i -quiet -dumpbase pixman-mmx.c -mcpu=iwmmxt
-mfloat-abi=soft -auxbase-strip pixman-mmx.o -g -O2 -Wall -version
-fvisibility=hidden -fPIC -o pixman-mmx.s
GNU C version 4.1.1 (arm-iwmmxt-linux-gnueabi)
compiled by GNU C version 4.0.2 20051125 (Red Hat 4.0.2-8).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=128512
Compiler executable checksum: 71bf2c400c805b2ad43cc927cbc9c343
/usr/include/mmintrin.h: In function 'pix_multiply':
/usr/include/mmintrin.h:529: internal compiler error: in
arm_expand_binop_builtin, at config/arm/arm.c:12548
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html> for instructions.
[sbox-i780_411: /usr/work/gtk/pixman-0.10.0/pixman] >


-- 
   Summary: /usr/include/mmintrin.h: In function 'pix_multiply':
/usr/include/mmintrin.h:529: internal compiler error: in
arm_expand_binop_builtin, at config/arm/arm.c:12548
   Product: gcc
   Version: 4.1.1
Status: UNCONFIRMED
  Severity: blocker
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gfan at sta dot samsung dot com
GCC target triplet: arm-iwmmxt-linux-gnueabi


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



[Bug target/36798] /usr/include/mmintrin.h: In function 'pix_multiply':

2008-07-10 Thread gfan at sta dot samsung dot com


--- Comment #1 from gfan at sta dot samsung dot com  2008-07-10 22:36 
---
Created an attachment (id=15894)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15894&action=view)
the .i files which caused the error

 the .i file which cause the error


-- 


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



[Bug target/36798] /usr/include/mmintrin.h: In function 'pix_multiply':

2008-07-10 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Severity|blocker |normal
Summary|/usr/include/mmintrin.h: In |/usr/include/mmintrin.h: In
   |function 'pix_multiply':|function 'pix_multiply':
   |/usr/include/mmintrin.h:529:|
   |internal compiler error: in |
   |arm_expand_binop_builtin, at|
   |config/arm/arm.c:12548  |


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



[Bug target/36798] /usr/include/mmintrin.h: In function 'pix_multiply':

2008-07-10 Thread gfan at sta dot samsung dot com


--- Comment #2 from gfan at sta dot samsung dot com  2008-07-10 22:37 
---
Created an attachment (id=15895)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15895&action=view)
the .c file caused the error

 The .c file which caused the error


-- 


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



[Bug target/36798] /usr/include/mmintrin.h: In function 'pix_multiply':

2008-07-10 Thread gfan at sta dot samsung dot com


--- Comment #3 from gfan at sta dot samsung dot com  2008-07-10 22:44 
---
the pixman-mmx.c is for iwmmxt supported for pixman-0.10.0 downloaded from
"http://www.cairographics.org/releases/pixman-0.10.0.tar.gz";.
Built with scratchbox with foreign compiler: gcc-4.1.1. But the same error also
happen outside scratchbox.


-- 


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



[Bug c++/36799] New: error on va_copy in -std=c++0x mode

2008-07-10 Thread sebor at roguewave dot com
The program below compiles successfully in gnu++0x mode but fails to compile
in c++0x mode. Since va_copy() is in C++ 0x I expect the program to compile
regardless.

$ cat t.cpp && g++ t.cpp -std=c++0x
#include 

int main ()
{
va_list x;
va_list y;
va_copy (y, x);
}
t.cpp: In function ‘int main()’:
t.cpp:7: error: ‘va_copy’ was not declared in this scope


-- 
   Summary: error on va_copy in -std=c++0x mode
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sebor at roguewave dot com


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



[Bug tree-optimization/36766] [4.4 Regression] natGC.cc:229: internal compiler error: Segmentation fault

2008-07-10 Thread danglin at gcc dot gnu dot org


--- Comment #2 from danglin at gcc dot gnu dot org  2008-07-10 23:02 ---
Also occurs on hppa-unknown-linux-gnu.


-- 


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



[Bug c++/36799] error on va_copy in -std=c++0x mode

2008-07-10 Thread sebor at roguewave dot com


--- Comment #1 from sebor at roguewave dot com  2008-07-10 23:04 ---
I should have mentioned: the same problem exists with .


-- 


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



[Bug target/36780] [4.3/4.4 Regression] Wrong reload generated for subreg address on SH

2008-07-10 Thread kkojima at gcc dot gnu dot org


--- Comment #2 from kkojima at gcc dot gnu dot org  2008-07-10 23:25 ---
First I've modified addsi3 pattern and added a splitter

(define_split
  [(set (match_operand:SI 0 "arith_reg_dest" "")
   (plus:SI (match_operand:SI 1 "arith_operand" "")
(match_operand:SI 2 "arith_operand" "")))]
  "TARGET_SH1 && reload_completed && !rtx_equal_p (operands[0], operands[1])"
  [(set (match_dup 0) (match_dup 2))
   (set (match_dup 0) (plus:SI (match_dup 0) (match_dup 1)))]
  "")

This fixes the build failure but there are many regressions
at -O0.  It seems that the reload in problem makes very complex
reloads on this backend and some another latent problems are
revealed.  I've tried to see what is going on for these cases
for a while and then given up.
When looking into these complex reloads, I've noticed that
the address having the type (plus (plus reg const_int) const_int)
is cared about specially in LEGITIMIZE_RELOAD_ADDRESS in this
backend.  I've tried to add the corresponding code in
GO_IF_LEGITIMATE_ADDRESS so that strict_memory_address_p can
recognize the above address expression when reloading.
It fixes the build failure and there are no major regressions
with it.  Although this is clearly a workaround and the issue
should be looking more deeply, I guess this will be ok at this
point, especially for the 4.3-branch which will schedule
the 4.3.2 release in a month.
Now I'm testing the patch below for 4.3/4.4 in native environments:

--- ORIG/trunk/gcc/config/sh/sh.h   2008-07-06 09:31:18.0 +0900
+++ LOCAL/trunk/gcc/config/sh/sh.h  2008-07-10 13:58:40.0 +0900
@@ -2501,6 +2501,18 @@ struct sh_args {
goto LABEL; \
}   \
 }  \
+  /* When reload in progress, find_reloads_subreg_address tries to \
+ make a new reload for some types of address.  Unfortunately it\
+ generates wrong code on SH.  See PR36780.  The following is to\
+ avoid this issue.  */ \
+  if (!TARGET_SHMEDIA && reload_in_progress\
+  && GET_CODE (X) == PLUS  \
+  && (GET_MODE_SIZE (MODE) == 4 || GET_MODE_SIZE (MODE) == 8)  \
+  && GET_CODE (XEXP ((X), 0)) == PLUS  \
+  && GET_CODE (XEXP (XEXP ((X), 0), 1)) == CONST_INT   \
+  && BASE_REGISTER_RTX_P (XEXP (XEXP ((X), 0), 0)) \
+  && GET_CODE (XEXP ((X), 1)) == CONST_INT)   
\
+goto LABEL;   
\
 }

 /* Try machine-dependent ways of modifying an illegitimate address


-- 


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



[Bug target/36800] New: va_arg for _Decimal128 on 32-bit Power mishandled in certain cases

2008-07-10 Thread jsm28 at gcc dot gnu dot org
The following fails on 32-bit hard-float powerpc*-*-linux* (tested for trunk,
code inspection indicates present for 4.3 as well).

#include 
extern void abort (void);

void
f (int a, ...)
{
  va_list ap;
  if (a != 0)
abort ();
  va_start (ap, a);
  if (va_arg (ap, _Decimal128) != 1.2DL)
abort ();
  if (va_arg (ap, _Decimal128) != 2.34DL)
abort ();
  if (va_arg (ap, _Decimal128) != 3.456DL)
abort ();
  if (va_arg (ap, _Decimal128) != 4.567DL)
abort ();
  if (va_arg (ap, double) != 5.125)
abort ();
  va_end (ap);
}

int
main (void)
{
  f (0, 1.2DL, 2.34DL, 3.456DL, 4.567DL, 5.125);
  return 0;
}

Suppose some arguments are passed in floating-point registers using all but
f8 and maybe f7 of the registers available for floating-point arguments.
Suppose the next argument is _Decimal128, so is passed on the stack because
an aligned pair of registers is not available, and that this _Decimal128
argument is one of the variable arguments in a call to a variadic function,
and that a following argument is one that would fit in a single floating-point
register if the _Decimal128 argument hadn't forced all subsequent
floating-point arguments to go on the stack.

Then the code to ensure that subsequent va_arg calls after the one getting
that _Decimal128 argument do not look in the saved floating-point
registers

  if ((n_reg == 2 && !regalign) || n_reg > 2)
{
  /* Ensure that we don't find any more args in regs.
 Alignment has taken care of for special cases.  */
  t = build_gimple_modify_stmt (reg,
build_int_cst (TREE_TYPE (reg), 8));
  gimplify_and_add (t, pre_p);
}

does not trigger because regalign is set.  But unlike the alignment for
pairs of GPRs, the alignment here sets fpr to 7 leaving a subsequent va_arg
call thinking it can take a value from f8.

I think the fix is simply not to set regalign in this case, but I haven't
tested this.


-- 
   Summary: va_arg for _Decimal128 on 32-bit Power mishandled in
certain cases
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jsm28 at gcc dot gnu dot org
GCC target triplet: powerpc*-*-linux*


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



[Bug c++/36794] Internal compiler error: Segmentation fault, when incorrectly using __attribute__ ((packed))

2008-07-10 Thread vanco dot gccbugzilla at vancomaja dot com


--- Comment #6 from vanco dot gccbugzilla at vancomaja dot com  2008-07-11 
00:28 ---
(In reply to comment #5)
> Subject: Re:  Internal compiler error: Segmentation fault, when 
>  incorrectly using __attribute__ ((packed))
> 
> 
> > None. I just thought this is the proper place to file it.
> > 
> > Please feel free to ignore this problem - it's just something that I noticed
> > while I was playing with __attribute__ ((packed)).
> 
> This is the place to report it if you can reproduce it with stock gcc. 
> What Andrew is saying is that Redhat adds an unknown amount of changes
> to their gcc which is why they also change the bug reporting location
> string from gcc bugzilla to their own Redhat bugzilla.  You can't expect
> gcc developers to be interested in tracking down bugs in a gcc modified
> with somebody else's random patches.
> 

Just trying to be helpful. Not expecting you guys to fix it... Please ignore...


-- 


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



[Bug libstdc++/36801] New: config/cpu/generic/atomicity_mutex/atomicity.h incorrectly relies on global constructor ordering

2008-07-10 Thread jifl-bugzilla at jifvik dot org
In 4.3.1 (and 4.2.x and the trunk), ARM targets and no doubt plenty others use
libstdc++/config/cpu/generic/atomicity_mutex/atomicity.h.

With some build magic in libstdc++/src/Makefile.am, this file is also
atomicity.cc when building the library. Thus this object gets instantiated:
{
  __gnu_cxx::__mutex atomic_mutex;
} // anonymous namespace

The constructor for __mutex in include/ext/concurrence.h has a private member
of the underlying __gthread_mutex_t, and its constructor uses
GTHREAD_MUTEX_INIT or calls GTHREAD_MUTEX_INIT_FUNCTION as appropriate, as of
course it should.

The problem is that this becomes a global constructor and there is no control
over where in the running of global constructors it gets run. A consequence of
this is that any other initialisation function from another constructor using
atomic operations can end up locking a mutex which has never been initialised,
with unsurprising results. An example of such a case is ios_base::Init::Init()
which calls __gnu_cxx::__exchange_and_add_dispatch() which eventually reaches
__gnu_cxx::__scoped_lock sentry(atomic_mutex); which attempts to lock
atomic_mutex.

Code prior to this implementation used __gthread_mutex_t in atomicity.h
directly  using a macro defined by concurrence.h:
  __glibcxx_mutex_define_initialized(atomic_mutex);
and as such this used to work, so this is a regression.

It seems this is an unintended consequence of this change:
http://gcc.gnu.org/ml/libstdc++/2006-09/msg00084.html

I think this needs returning to something similar to the way it was before, so
that the __gthread_mutex_t was created in the atomic_mutex's own constructor.


-- 
   Summary: config/cpu/generic/atomicity_mutex/atomicity.h
incorrectly relies on global constructor ordering
   Product: gcc
   Version: 4.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jifl-bugzilla at jifvik dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-eabi


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



[Bug middle-end/36802] New: pop_gimplify_context ICE using openmp task construct

2008-07-10 Thread BlanchardJ at ieee dot org
I get the following error when compiling using gcc snapshot 4.4.0 20080704

main.c|18|internal compiler error: in pop_gimplify_context, at gimplify.c:194

See code at the end of the post and gcc configure options.

Obviously when removing the -fopenmp switch the ICE go away. Also removing
either the omp task or omp single directive make the error go away. The ICE
also vanish if the expression inside the while loop is a constant.

This error appear at all optimization level with or without debugging enabled. 

using the following code (reduced case...) :

int main()
{
int i = 0;
#pragma omp parallel
{
#pragma omp single
while( i < 1 )
{
#pragma omp task
i++;
}
}
  return 0;
}

gcc configure options :
$ gcc -v
Using built-in specs.
Target: mingw32
Configured with: ./gcc-4.4.0/configure --prefix=/mingw --enable-bootstrap
--build=mingw32 --program-prefix= --with-as=/mingw/bin/as.exe
--with-ld=/mingw/bin/ld.exe --with-gcc --with-gnu-ld --with-gnu-as
--enable-languages=c,c++,objc,fortran --disable-nls --disable-win32-registry
--disable-werror --enable-sjlj-exceptions --enable-threads=win32
--disable-symvers --disable-libstdcxx-pch
--enable-version-specific-runtime-libs
--enable-cxx-flags='-fno-function-sections -fno-data-sections'
--enable-fully-dynamic-string --enable-libgomp --enable-checking=release
Thread model: win32
gcc version 4.4.0 20080704 (experimental) (GCC)


-- 
   Summary: pop_gimplify_context ICE using openmp task construct
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: BlanchardJ at ieee dot org
 GCC build triplet: i686-pc-mingw


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



[Bug middle-end/36802] pop_gimplify_context ICE using openmp task construct

2008-07-10 Thread BlanchardJ at ieee dot org


--- Comment #1 from BlanchardJ at ieee dot org  2008-07-11 03:15 ---
Created an attachment (id=15896)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15896&action=view)
preprocessed file of the presented testcase


-- 


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



[Bug tree-optimization/36765] [4.4 Regression] Revision 137573 miscompiles 464.h264ref in SPEC CPU 2006

2008-07-10 Thread Joey dot ye at intel dot com


--- Comment #1 from Joey dot ye at intel dot com  2008-07-11 05:46 ---
Created an attachment (id=15897)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15897&action=view)
Small test case reduced from cpu2006.464.h264ref

/home/jye2/work/bug-37665> gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../src/configure --disable-bootstrap
--enable-languages=c,c++,fortran --enable-checking=assert
Thread model: posix
gcc version 4.4.0 20080707 (experimental) [trunk revision 137573] (GCC) 
/home/jye2/work/bug-37665> make -B && ./m.exe && echo PASS
gcc -c main.c -g
gcc -O2 -ffast-math -g   -c -o l5.o l5.c
gcc -o m.exe main.o l5.o
Bmin[0]=21
Aborted

/home/jye2/work/bug-37665> gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../src/configure --disable-bootstrap
--enable-languages=c,c++,fortran --enable-checking=assert
Thread model: posix
gcc version 4.4.0 20080707 (experimental) [trunk revision 137572] (GCC) 
/home/jye2/work/bug-37665> make -B && ./m.exe && echo PASS
gcc -c main.c -g
gcc -O2 -ffast-math -g   -c -o l5.o l5.c
gcc -o m.exe main.o l5.o
PASS


-- 


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



[Bug tree-optimization/36765] [4.4 Regression] Revision 137573 miscompiles 464.h264ref in SPEC CPU 2006

2008-07-10 Thread Joey dot ye at intel dot com


--- Comment #2 from Joey dot ye at intel dot com  2008-07-11 05:49 ---
Effect of line 76 
buffer_frame[0] = InitFullness;
is eliminated by optimizer due to bug in GCC.


-- 


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



[Bug fortran/36795] crash with character allocatable array argument

2008-07-10 Thread burnus at gcc dot gnu dot org


--- Comment #1 from burnus at gcc dot gnu dot org  2008-07-11 06:00 ---
The problem is:
   call foo((xx),xx)

gfortran simplifies the "(xx)" to "xx" by passing (-fdump-tree-orignal):
  foo (&xx, &xx, 10, 10);

Since the second argument is nullified in "foo" as it is INTENT(OUT), it is
obvious that accessing the first argument causes a crash.

NAG f95 solves this by creating a temporary for "(xx)" - as does g95.


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

   Keywords||wrong-code


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



[Bug fortran/36803] New: Should reject: INTENT(OUT) formal + nondefinable actual argument

2008-07-10 Thread burnus at gcc dot gnu dot org
The following is invalid as "(n)" is not definable and thus shall not be passed
to an INTENT(OUT) variable. For scalars or for other types than CHARACTER, one
gets the expected
  Error: Actual argument at (1) must be definable as the dummy argument 'x'
 is INTENT = OUT/INOUT

The problem might have the same cause as PR 36795.

interface
  subroutine foo(x)
character, intent(out) :: x(:)  ! or INTENT(INOUT)
  end subroutine foo
end interface
character :: n(5)
call foo( (n) )
end


-- 
   Summary: Should reject: INTENT(OUT) formal + nondefinable actual
argument
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Keywords: accepts-invalid
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org


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



[Bug fortran/36795] crash with character allocatable array argument

2008-07-10 Thread burnus at gcc dot gnu dot org


--- Comment #2 from burnus at gcc dot gnu dot org  2008-07-11 06:14 ---
Looking at PR 36803, I think the general algorithm could be correct, however,
it might not trigger for CHARACTER arrays. Maybe a fix for either PRs fixes
both.


-- 

burnus at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-07-11 06:14:04
   date||


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



  1   2   >