[Bug target/34653] operation performed unnecessarily in 64-bit mode

2009-09-24 Thread bonzini at gnu dot org


--- Comment #6 from bonzini at gnu dot org  2009-09-24 06:06 ---
Not a dup, since this is about shortening the mode, rather than about
eliminating zero extensions.


-- 

bonzini at gnu dot org changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
   Keywords||missed-optimization
 Resolution|DUPLICATE   |
Summary|unnecessary REX prefix  |operation performed
   ||unnecessarily in 64-bit mode


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



[Bug rtl-optimization/41455] memcpy not tail called if it's a struct assignment

2009-09-24 Thread ramana at gcc dot gnu dot org


--- Comment #1 from ramana at gcc dot gnu dot org  2009-09-24 06:29 ---
Confirmed with trunk

Because Tail calling is now done at the tree level. I remember me or someone
fixing this by detecting block moves in tree-tail-call.c and then set up the
flags accordingly. IIRC the same problem applied to builtins earlier.

Let me take a look.


-- 

ramana at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-09-24 06:29:30
   date||


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



[Bug middle-end/41435] GCC doesn't fold complex int division

2009-09-24 Thread ghazi at gcc dot gnu dot org


--- Comment #2 from ghazi at gcc dot gnu dot org  2009-09-24 07:08 ---
Patch posted here:
http://gcc.gnu.org/ml/gcc-patches/2009-09/msg01685.html


-- 


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



[Bug target/41456] New: unrecognized R constraint: R13

2009-09-24 Thread eightdot at hotmail dot com
note on version:
the source suggests this bug even exists in trunk as of rev 151996

while compiling:

asm volatile (\
mov.w  %1,r0\n\t\
mulu.w %2,r0\n\t\
snip
adc.w  #0,r2\n\t \
:=R13 (yyl), =R02 (yyh) \
:o(xxa),o(xxb) \
:a0
);
i get:
unrecognized R constraint: R13
src/libc.c: In function ‘myfunc’:
src/libc.c:955: internal compiler error: in m32c_reg_class_from_constraint, at
config/m32c/m32c.c:699

http://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html#Machine-Constraints
says:
R02
$r0 or $r2, or $r2r0 for 32 bit values.
R13
$r1 or $r3, or $r3r1 for 32 bit values.
while
http://gcc.gnu.org/viewcvs/trunk/gcc/config/m32c/m32c.h?view=markup
suggests
R02 R03 R23 are supported 
but R13 is nowhere in the file
(R03 and R23 are there but not documented in the doc above?)


-- 
   Summary: unrecognized R constraint: R13
   Product: gcc
   Version: 4.3.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eightdot at hotmail dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: m32c-unknown-elf


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



[Bug other/39888] TLS emutls not linked to automatically on Darwin

2009-09-24 Thread developer at sandoe-acoustics dot co dot uk


--- Comment #26 from developer at sandoe-acoustics dot co dot uk  
2009-09-24 07:46 ---
(In reply to comment #24)
 I am confused why libgcc_ext needs to be built as 10.4/10.5 versions. Aren't

the _ext is versioned - precisely because the symbols included in the OS
version changes between OS revisions.  No only that, but there are different
symbol sets between 32 and 64 bit libs.

As far as darwin8 and darwin9 are concerned - I have no better offer than the
_ext as formulated above (I will try and update the patches in the next couple
of weeks).

As far as darwin10 is concerned Mike's solution needs implementation and
evaluation, if we are to adopt it.  I'll try and find a free machine to put
darwin10 on.


-- 


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



[Bug bootstrap/41457] New: [4.5 Regression] Bootstrap failure at revision 152100

2009-09-24 Thread dominiq at lps dot ens dot fr
On powerpc-apple-darwin9 with the changes I will post on pr41405, bootstrap
fails with:

...
/opt/gcc/darwin_buildw/./prev-gcc/xgcc -B/opt/gcc/darwin_buildw/./prev-gcc/
-B/opt/gcc/gcc4.5w/powerpc-apple-darwin9/bin/
-B/opt/gcc/gcc4.5w/powerpc-apple-darwin9/bin/
-B/opt/gcc/gcc4.5w/powerpc-apple-darwin9/lib/ -isystem
/opt/gcc/gcc4.5w/powerpc-apple-darwin9/include -isystem
/opt/gcc/gcc4.5w/powerpc-apple-darwin9/sys-include-c  -g -O2
-mdynamic-no-pic -gstrict-dwarf -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -I.
-I../../gcc-4.5-work/gcc -I../../gcc-4.5-work/gcc/.
-I../../gcc-4.5-work/gcc/../include -I../../gcc-4.5-work/gcc/../libcpp/include
-I/opt/mpc/build//include  -I/sw/include 
-I../../gcc-4.5-work/gcc/../libdecnumber
-I../../gcc-4.5-work/gcc/../libdecnumber/dpd -I../libdecnumber -I/sw/include 
-I/sw/include -DCLOOG_PPL_BACKEND   ../../gcc-4.5-work/gcc/c-format.c -o
c-format.o
../../gcc-4.5-work/gcc/c-format.c: In function 'check_format_info_main':
../../gcc-4.5-work/gcc/c-format.c:2125:1: internal compiler error: in
add_const_value_attribute, at dwarf2out.c:13478

The file compiles if I remove '-gstrict-dwarf' and '-g' (currently building
libjava at -m64, allow for a couple more hours for bootstrap to complete).

With the similar changes bootstrapping revision 152076 on i686-apple-darwin9.


-- 
   Summary: [4.5 Regression] Bootstrap failure at revision 152100
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: blocker
  Priority: P3
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dominiq at lps dot ens dot fr
 GCC build triplet: powerpc-apple-darwin9
  GCC host triplet: powerpc-apple-darwin9
GCC target triplet: powerpc-apple-darwin9


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



[Bug bootstrap/41457] [4.5 Regression] Bootstrap failure at revision 152100

2009-09-24 Thread dominiq at lps dot ens dot fr


--- Comment #1 from dominiq at lps dot ens dot fr  2009-09-24 08:56 ---
Created an attachment (id=18643)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18643action=view)
c-format.i


-- 


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



[Bug bootstrap/41405] [4.5 Regression] Bootstrap fails on *-apple-darwin* due to revision 151815

2009-09-24 Thread dominiq at lps dot ens dot fr


--- Comment #61 from dominiq at lps dot ens dot fr  2009-09-24 09:05 ---
I have followed a path different from the one in comment #58, trying to use
-gstrict-dwarf during bootstrap. For that I have made the following changes:

diff -uN ../_gcc_clean/config/mh-intel-darwin config/mh-intel-darwin
--- ../_gcc_clean/config/mh-intel-darwin1970-01-01 01:00:00.0
+0100
+++ config/mh-intel-darwin  2009-09-23 23:02:59.0 +0200
@@ -0,0 +1,5 @@
+# Set strict-dwarf for Darwin
+
+BOOT_CFLAGS += -gstrict-dwarf
+CFLAGS_FOR_TARGET += -gstrict-dwarf
+CFLAGS += -gstrict-dwarf
diff -uN ../_gcc_clean/config/mh-ppc-darwin config/mh-ppc-darwin
--- ../_gcc_clean/config/mh-ppc-darwin  2008-02-25 11:00:23.0 +0100
+++ config/mh-ppc-darwin2009-09-23 23:56:42.0 +0200
@@ -2,4 +2,6 @@
 # position-independent-code -- the usual default on Darwin. This fix speeds
 # compiles by 3-5%.

-BOOT_CFLAGS += -mdynamic-no-pic
+BOOT_CFLAGS += -mdynamic-no-pic -gstrict-dwarf
+CFLAGS_FOR_TARGET += -gstrict-dwarf
+CFLAGS += -gstrict-dwarf
--- ../_gcc_clean/configure 2009-09-22 20:04:27.0 +0200
+++ configure   2009-09-23 13:50:29.0 +0200
@@ -3655,6 +3655,12 @@
   powerpc-*-darwin*)
 host_makefile_frag=config/mh-ppc-darwin
 ;;
+  i[3456789]86-*-darwin*)
+host_makefile_frag=config/mh-intel-darwin
+;;
+  x86_64-*-darwin[912]*)
+host_makefile_frag=config/mh-intel-darwin
+;;
   powerpc-*-aix*)
 host_makefile_frag=config/mh-ppc-aix
 ;;

With these changes I have successfully bootstrapped revision 152076 on
i686-apple-darwin9 and I am currently bootstrapping revision 152100 on
powerpc-apple-darwin9 (modulo pr41457).

I have found that the change 'CFLAGS_FOR_TARGET += -gstrict-dwarf' is needed to
bootstrap, while the change 'CFLAGS += -gstrict-dwarf' (nor the others) does
not allow to propagate -gstrict-dwarf for the libraries, hence Assertion
failed: (!Unknown one-operand)... for them.


-- 


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



[Bug testsuite/41444] Typo in gcc/testsuite/gcc.dg/guality/guality.h

2009-09-24 Thread dominiq at lps dot ens dot fr


--- Comment #2 from dominiq at lps dot ens dot fr  2009-09-24 09:10 ---
 Patches should be posted to gcc-patches.

This is not a patch, it is the best way I have found to describe the PR. Would
have it be better to report
gcc/testsuite/gcc.dg/guality/example.c fails on Darwin with

In file included from example.c:10:0:
guality.h: In function 'main':
guality.h:190:24: error: expected ';' before 'GUALITY_GDB_REDIRECT'
guality.h:193:53: error: expected ')' before 'GUALITY_GDB_REDIRECT'
guality.h:196:17: error: expected ')' before 'GUALITY_GDB_REDIRECT'

?


-- 


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



[Bug tree-optimization/41428] CCP doesn't fold all comparisons it could

2009-09-24 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2009-09-24 09:16 ---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug c/41458] New: Inefficient write of 32 bit value to 16 bit volatile on ARM

2009-09-24 Thread tobias at ringis dot se
GCC from at least 4.1.1, up to and including 4.4.1 generates two redundant bit
shift operations when writing a 32 bit value to a 16 bit variable. Example:

  volatile unsigned short v1;
  void test1(unsigned x) { v1 = x; }

This code generates the following when compiled with arm-elf-gcc -O2 -S -o-
tmp.c:

mov r0, r0, asl #16
ldr r3, .L3
mov r0, r0, lsr #16
strhr0, [r3, #0]@ movhi

If compiled with GCC 3.4.4, or if the volatile is removed, the expected code is
generated:

ldr r3, .L7
strhr0, [r3, #0]@ movhi

This also does not happen with GCC 4.4.1 for i586-redhat-linux.  It generates
identical code whether the volatile is there or not.


-- 
   Summary: Inefficient write of 32 bit value to 16 bit volatile on
ARM
   Product: gcc
   Version: 4.4.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tobias at ringis dot se
 GCC build triplet: i586-redhat-linux
  GCC host triplet: i586-redhat-linux
GCC target triplet: arm-elf


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



[Bug bootstrap/41405] [4.5 Regression] Bootstrap fails on *-apple-darwin* due to revision 151815

2009-09-24 Thread dominiq at lps dot ens dot fr


--- Comment #62 from dominiq at lps dot ens dot fr  2009-09-24 09:40 ---
See also http://gcc.gnu.org/ml/gcc/2009-09/msg00500.html .


-- 


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



[Bug target/38085] gcc -m64 -pg generates invalid assembler code on Solaris 10/x86

2009-09-24 Thread hailijuan at gmail dot com


--- Comment #4 from hailijuan at gmail dot com  2009-09-24 09:50 ---
There is another problem with gcc -m64 -pg since 4.4.0, seen from below:

# file
/import/dr3/i386/gcc-4.4.0/lib/gcc/i386-pc-solaris2.11/4.4.0/amd64/gmon.o
/import/dr3/i386/gcc-4.4.0/lib/gcc/i386-pc-solaris2.11/4.4.0/amd64/gmon.o:
ELF 32-bit LSB relocatable 80386 Version 1

Seen from gcc building log, gcc didn't build gmon.o with m64 as expected. Since
4.4, gcc/config/i386/t-sol2 has been moved to libgcc/config/i386/t-sol2.
However the flags for gmon.o turned to be empty. 

Any comments on the issue? Thanks,
-- Lijuan


(In reply to comment #3)
 internal_mcount's from and self arguments were reversed from glibc's version. 
 Here's the full diff of gmon-sol2.c that produces correct output:
 --- gcc/config/i386/gmon-sol2.c.origWed Jul 29 08:57:15 2009
 +++ gcc/config/i386/gmon-sol2.c Thu Jul 30 07:53:16 2009
 @@ -66,7 +66,7 @@
  extern void _mcleanup (void);
  extern void internal_mcount (
  #ifdef __x86_64__
 -char *, unsigned short *
 +unsigned short *, char *
  #else
  void
  #endif
 @@ -266,8 +266,8 @@
  \tmovq\t%r9,0x30(%rsp)\n
  /* Get SELFPC (pushed by the call to this function) and
 FROMPCINDEX (via the frame pointer.  */
 -\tmovq\t0x38(%rsp),%rdi\n
 -\tmovq\t0x8(%rbp),%rsi\n
 +\tmovq\t0x38(%rsp),%rsi\n
 +\tmovq\t0x8(%rbp),%rdi\n
  \tcallq\tinternal_mcount\n
  /* Restore the saved registers.  */
  \tmovq\t0x30(%rsp),%r9\n
 @@ -275,7 +275,7 @@
  \tmovq\t0x20(%rsp),%rdi\n
  \tmovq\t0x18(%rsp),%rsi\n
  \tmovq\t0x10(%rsp),%rdx\n
 -\tmovq\t0x08(%rsp),%rdx\n
 +\tmovq\t0x08(%rsp),%rcx\n
  \tmovq\t(%rsp),%rax\n
  \taddq\t$0x38,%rsp\n
  \tretq\n
 @@ -290,8 +290,8 @@
  void
  internal_mcount (
  #ifdef __x86_64__
 -char *selfpc,
 -unsigned short *frompcindex
 +unsigned short *frompcindex,
 +char *selfpc
  #else
  void
  #endif
 


-- 

hailijuan at gmail dot com changed:

   What|Removed |Added

 CC||hailijuan at gmail dot com


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



[Bug debug/41065] DW_TAG_enumeration_type+DW_TAG_enumerator is sometimes missing

2009-09-24 Thread dodji at gcc dot gnu dot org


--- Comment #5 from dodji at gcc dot gnu dot org  2009-09-24 10:38 ---
Fixed in 4_4 and 4_5.


-- 

dodji at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug fortran/41459] New: Error not printed with -Werror and -fmax-errors=1

2009-09-24 Thread domob at gcc dot gnu dot org
When compiling the following test code:

100 
  end

I get:

[/tmp]# gfortran-dev test.f90 
test.f90:1.4:

100 
1
Warning: Ignoring statement label in empty statement at (1)

But with -Werror and -fmax-errors=1:

[/tmp]# gfortran-dev test.f90 -fmax-errors=1 -Werror
Fatal Error: Error count reached limit of 1.

Which is a bit misleading as it does no longer mention what the error itself
is.


-- 
   Summary: Error not printed with -Werror and -fmax-errors=1
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Keywords: diagnostic
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: domob at gcc dot gnu dot org


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



[Bug middle-end/41357] libgomp build fail

2009-09-24 Thread christian dot joensson at gmail dot com


--- Comment #30 from christian dot joensson at gmail dot com  2009-09-24 
11:10 ---
Not sure about the status here... but, on this system:
Windows XP Pro/SP3 cygwin Intel Core2 Duo t9...@2.80ghz system with packages:

binutils 2.19.51-1  2.19.51.20090704
bison2.3-1  2.3
cloog-ppl0.15.3-1
cygwin   1.7.0-61  
dejagnu  20021217-2 1.4.2.x
expect   20030128-1 5.26
gcc-ada  3.4.4-999
gcc-core 3.4.4-999
gcc-g++  3.4.4-999
gmp  4.3.1-3
libcloog-devel   0.15.3-1
libgmp-devel 4.3.1-3
libmpfr-devel2.4.1-4
libppl   0.10.2-1
make 3.81-2
mpfr 2.4.1-4
ppl  0.10.2-1
ppl-devel0.10.2-1
tcltk20080420-1 8.4
w32api   3.13-1 

LAST_UPDATED: Thu Sep 24 09:42:02 UTC 2009 (revision 152114)

configure: --prefix=/usr/local/gnu --enable-threads=posix --enable-libgcj
--enable-libgomp --disable-sjlj-exceptions --with-system-zlib --enable-nls
--enable-static --enable-shared --enable-shared-libgcc --enable-__cxa_atexit
--disable-libmudflap --enable-version-specific-runtime-libs
--without-included-gettext --with-dwarf2 --disable-symvers --enable-libssp
--with-mpc --without-ppl --without-cloog
--enable-languages=c,ada,c++,fortran,java,objc,obj-c++

I still get 

/bin/sh ./libtool --tag CC   --mode=link /usr/local/src/trunk/objdir/./gcc/xgcc
-B/usr/local/src/trunk/objdir/./gcc/ -B/usr/local/gnu/i686-pc-cygwin/bin/
-B/usr/local/gnu/i686-pc-cygwin/lib/ -isystem
/usr/local/gnu/i686-pc-cygwin/include -isystem
/usr/local/gnu/i686-pc-cygwin/sys-include-Wall -Werror -Wc,-pthread -g -O2 
 -Wl,-O1   -o libgomp.la -version-info 1:0:0  -no-undefined -bindir
/usr/local/gnu/bin -rpath /usr/local/gnu/lib/gcc/i686-pc-cygwin/4.5.0
alloc.lo barrier.lo critical.lo env.lo error.lo iter.lo iter_ull.lo loop.lo
loop_ull.lo ordered.lo parallel.lo sections.lo single.lo task.lo team.lo
work.lo lock.lo mutex.lo proc.lo sem.lo bar.lo ptrlock.lo time.lo fortran.lo
affinity.lo  
libtool: link: rm -fr  .libs/libgomp.dll.a
libtool: link: /usr/local/src/trunk/objdir/./gcc/xgcc
-B/usr/local/src/trunk/objdir/./gcc/ -B/usr/local/gnu/i686-pc-cygwin/bin/
-B/usr/local/gnu/i686-pc-cygwin/lib/ -isystem
/usr/local/gnu/i686-pc-cygwin/include -isystem
/usr/local/gnu/i686-pc-cygwin/sys-include-shared  .libs/alloc.o
.libs/barrier.o .libs/critical.o .libs/env.o .libs/error.o .libs/iter.o
.libs/iter_ull.o .libs/loop.o .libs/loop_ull.o .libs/ordered.o .libs/parallel.o
.libs/sections.o .libs/single.o .libs/task.o .libs/team.o .libs/work.o
.libs/lock.o .libs/mutex.o .libs/proc.o .libs/sem.o .libs/bar.o .libs/ptrlock.o
.libs/time.o .libs/fortran.o .libs/affinity.o-pthread -Wl,-O1   -o
.libs/cyggomp-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker
.libs/libgomp.dll.a
xgcc: unrecognized option '-pthread'
Creating library file:
.libs/libgomp.dll.a.libs/team.o:team.c:(.debug_info+0x1084): undefined
reference to `_gomp_tls_data'
collect2: ld returned 1 exit status

make[4]: *** [libgomp.la] Error 1
make[4]: Leaving directory `/usr/local/src/trunk/objdir/i686-pc-cygwin/libgomp'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/usr/local/src/trunk/objdir/i686-pc-cygwin/libgomp'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/usr/local/src/trunk/objdir/i686-pc-cygwin/libgomp'
make[1]: *** [all-target-libgomp] Error 2
make[1]: Leaving directory `/usr/local/src/trunk/objdir'
make: *** [all] Error 2


-- 


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



[Bug tree-optimization/41460] New: value-numbering does not handle type-punning in a user-friendly way

2009-09-24 Thread rguenth at gcc dot gnu dot org
value-numbering could turn certain invalid constructs like

int b;
void f(void)
{
  float a;
  a = 1;
  b = *(int*)a;
}

into VIEW_CONVERT_EXPRs of the loaded bit-pattern.


-- 
   Summary: value-numbering does not handle type-punning in a user-
friendly way
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: enhancement
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org


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



[Bug c/41461] New: Regression between gcc 3.4.3 and gcc 3.4.6 for va_list

2009-09-24 Thread stephane dot herve at areva dot com
Problem with va_list argument returned by a fonction with 3.4.6 version of gcc.
Works fine with 3.4.3 version.

gcc version :
---
gcc -v
Reading specs from /usr/lib/gcc/x86_64-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-java-awt=gtk --host=x86_64-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)

System :
--
Linux 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:32:02 EDT 2006 x86_64 x86_64 x86_64
GNU/Linux

Error :
-
toto.c:3: error: `test' declared as function returning an array

Source text :
---
#include stdarg.h
va_list test();
main ()
{
 printf (Hello world\n);
}

Many thanks.


-- 
   Summary: Regression between gcc 3.4.3 and gcc 3.4.6 for va_list
   Product: gcc
   Version: 3.4.6
Status: UNCONFIRMED
  Severity: blocker
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: stephane dot herve at areva dot com


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



[Bug tree-optimization/41454] [4.4/4.5 Regression] DOM miscompiles gcc.c-torture/execute/990513-1.c at -O2 -fno-tree-vrp

2009-09-24 Thread matz at gcc dot gnu dot org


--- Comment #2 from matz at gcc dot gnu dot org  2009-09-24 12:50 ---
dom forgets update_stmt at strategic places.  Mine.


-- 

matz at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |matz at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-09-24 12:50:53
   date||


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



[Bug c/41461] Regression between gcc 3.4.3 and gcc 3.4.6 for va_list

2009-09-24 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2009-09-24 12:54 ---
You can't return va_list by value portably.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug other/39888] TLS emutls not linked to automatically on Darwin

2009-09-24 Thread howarth at nitro dot med dot uc dot edu


--- Comment #27 from howarth at nitro dot med dot uc dot edu  2009-09-24 
13:06 ---
I don't see why your current patch should present a problem for darwin10. My
understanding is that all of the symbols in libgcc-10.5 were moved into
libSystem
and they are ignored if present in libgcc regardless of linkage order. So if we
move all post libgcc-10.5 symbols into libgcc-ext-10.5 that should be fine.
I'll test your current patch on darwin10 tonight.


-- 


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



[Bug bootstrap/41457] [4.5 Regression] Bootstrap failure at revision 152100

2009-09-24 Thread jakub at gcc dot gnu dot org


--- Comment #2 from jakub at gcc dot gnu dot org  2009-09-24 13:08 ---
Subject: Bug 41457

Author: jakub
Date: Thu Sep 24 13:08:11 2009
New Revision: 152119

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=152119
Log:
PR bootstrap/41457
* dwarf2out.c (add_const_value_attribute): For HIGH and CONST_FIXED,
return false instead of gcc_unreachable ().  For CONST return the
value returned by recursive call instead of always returning true.
(tree_add_const_value_attribute): Return the value returned by
add_const_value_attribute instead of always returning true if rtl
is non-NULL.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c


-- 


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



[Bug target/41424] Optimized x86_64-w64 -O1 -foptimize-sibling-calls binary produces negative effects

2009-09-24 Thread xxcv07 at gmail dot com


--- Comment #8 from xxcv07 at gmail dot com  2009-09-24 13:11 ---
vlc's bug.


-- 

xxcv07 at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug other/39888] TLS emutls not linked to automatically on Darwin

2009-09-24 Thread howarth at nitro dot med dot uc dot edu


--- Comment #28 from howarth at nitro dot med dot uc dot edu  2009-09-24 
13:15 ---
Iain,
   You patch is showing some bit rot against current gcc trunk. Can you upload
an updated version that applies cleanly against the current sources?


-- 


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



[Bug bootstrap/41405] [4.5 Regression] Bootstrap fails on *-apple-darwin* due to revision 151815

2009-09-24 Thread howarth at nitro dot med dot uc dot edu


--- Comment #63 from howarth at nitro dot med dot uc dot edu  2009-09-24 
13:47 ---
(In reply to comment #62)
 See also http://gcc.gnu.org/ml/gcc/2009-09/msg00500.html .
 

Dominique,
   Have you tried current gcc trunk with...

http://gcc.gnu.org/ml/gcc-patches/2009-09/msg01686.html

I'll try a build of i686-apple-darwin10 tonight to make
sure that target is okay.


-- 


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



[Bug middle-end/36143] [4.4/4.5 Regression]: FAIL: g++.dg/tree-ssa/pr19637.C

2009-09-24 Thread rguenth at gcc dot gnu dot org


--- Comment #14 from rguenth at gcc dot gnu dot org  2009-09-24 13:47 
---
Subject: Bug 36143

Author: rguenth
Date: Thu Sep 24 13:47:26 2009
New Revision: 152122

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=152122
Log:
2009-09-24  Richard Guenther  rguent...@suse.de

PR tree-optimization/36143
PR tree-optimization/38747
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Only
create VIEW_CONVERT_EXPRs for TBAA compatible accesses.

* gcc.dg/tree-ssa/fre-vce-1.c: XFAIL.
* gcc.dg/tree-ssa/forwprop-6.c: Likewise.
* g++.dg/torture/pr38747.C: New testcase.
* g++.dg/tree-ssa/pr19637.C: Un-XFAIL.

Added:
trunk/gcc/testsuite/g++.dg/torture/pr38747.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/tree-ssa/pr19637.C
trunk/gcc/testsuite/gcc.dg/tree-ssa/forwprop-6.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/fre-vce-1.c
trunk/gcc/tree-ssa-forwprop.c


-- 


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



[Bug tree-optimization/38747] [4.4/4.5 Regression] Wrong code due to VIEW_CONVERT_EXPR

2009-09-24 Thread rguenth at gcc dot gnu dot org


--- Comment #9 from rguenth at gcc dot gnu dot org  2009-09-24 13:47 ---
Subject: Bug 38747

Author: rguenth
Date: Thu Sep 24 13:47:26 2009
New Revision: 152122

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=152122
Log:
2009-09-24  Richard Guenther  rguent...@suse.de

PR tree-optimization/36143
PR tree-optimization/38747
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Only
create VIEW_CONVERT_EXPRs for TBAA compatible accesses.

* gcc.dg/tree-ssa/fre-vce-1.c: XFAIL.
* gcc.dg/tree-ssa/forwprop-6.c: Likewise.
* g++.dg/torture/pr38747.C: New testcase.
* g++.dg/tree-ssa/pr19637.C: Un-XFAIL.

Added:
trunk/gcc/testsuite/g++.dg/torture/pr38747.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/tree-ssa/pr19637.C
trunk/gcc/testsuite/gcc.dg/tree-ssa/forwprop-6.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/fre-vce-1.c
trunk/gcc/tree-ssa-forwprop.c


-- 


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



[Bug tree-optimization/38747] [4.4 Regression] Wrong code due to VIEW_CONVERT_EXPR

2009-09-24 Thread rguenth at gcc dot gnu dot org


--- Comment #10 from rguenth at gcc dot gnu dot org  2009-09-24 13:48 
---
Fixed on trunk.  Trunk doesn't necessarily handle testcases like this correctly
anyway, so I am not considering in backporting the change ATM.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|rguenth at gcc dot gnu dot  |unassigned at gcc dot gnu
   |org |dot org
 Status|ASSIGNED|NEW
  Known to work|4.3.2   |4.3.2 4.5.0
Summary|[4.4/4.5 Regression] Wrong  |[4.4 Regression] Wrong code
   |code due to |due to VIEW_CONVERT_EXPR
   |VIEW_CONVERT_EXPR   |
   Target Milestone|4.4.0   |4.4.2


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



[Bug middle-end/36143] [4.4 Regression]: FAIL: g++.dg/tree-ssa/pr19637.C

2009-09-24 Thread rguenth at gcc dot gnu dot org


--- Comment #15 from rguenth at gcc dot gnu dot org  2009-09-24 13:49 
---
Fixed on the trunk.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

  BugsThisDependsOn||38747
  Known to work||4.5.0
Summary|[4.4/4.5 Regression]: FAIL: |[4.4 Regression]: FAIL:
   |g++.dg/tree-ssa/pr19637.C   |g++.dg/tree-ssa/pr19637.C


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



[Bug fortran/41459] Error not printed with -Werror and -fmax-errors=1

2009-09-24 Thread kargl at gcc dot gnu dot org


--- Comment #1 from kargl at gcc dot gnu dot org  2009-09-24 14:19 ---
This is probably related to a difference between gfc_warning and
gfc_warning_now.  If you look in parse.c, you'll see free-form and
fixed-form code behave differently.  For fixed-form, no warning is
issued.  This patch fixes the fixed-form non-warning case.  It
also gives a better locus.

Index: parse.c
===
--- parse.c (revision 151785)
+++ parse.c (working copy)
@@ -655,7 +655,7 @@ next_free (void)
  if (gfc_match_eos () == MATCH_YES)
{
  gfc_warning_now (Ignoring statement label in empty statement 
-  at %C);
+  at %L, label_locus);
  gfc_free_st_label (gfc_statement_label);
  gfc_statement_label = NULL;
  return ST_NONE;
@@ -848,7 +848,8 @@ next_fixed (void)

 blank_line:
   if (digit_flag)
-gfc_warning (Ignoring statement label in empty statement at %C);
+gfc_warning_now (Ignoring statement label in empty statement at %L,
+label_locus);

   gfc_current_locus.lb-truncated = 0;
   gfc_advance_line ();


-- 


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



[Bug rtl-optimization/40987] Wrong optimization with if-conversion

2009-09-24 Thread mikpe at it dot uu dot se


--- Comment #10 from mikpe at it dot uu dot se  2009-09-24 14:38 ---
Patch posted for review:
http://gcc.gnu.org/ml/gcc-patches/2009-09/msg01655.html


-- 


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



[Bug bootstrap/41457] [4.5 Regression] Bootstrap failure at revision 152100

2009-09-24 Thread developer at sandoe-acoustics dot co dot uk


--- Comment #3 from developer at sandoe-acoustics dot co dot uk  2009-09-24 
15:17 ---
(In reply to comment #2)
 Subject: Bug 41457
 
 Author: jakub
 Date: Thu Sep 24 13:08:11 2009
 New Revision: 152119
 
 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=152119

Thanks Jakub!
powerpc-apple-darwin8 bootstraps again with this.


-- 


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



[Bug ada/41100] [4.4 regression] Unchecked_Deallocation causes wrong free errors

2009-09-24 Thread laurent at guerby dot net


--- Comment #4 from laurent at guerby dot net  2009-09-24 15:51 ---
It's not a double free: free is called once but not with the pointer returned
by malloc, it is passed for some reason the pointer returned by malloc + 0x10. 
valgrind detects it when it reports: Address 0x5b3b040 is 16 bytes inside a
block of size 136 

(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/guerby/pr41100/main 

Breakpoint 5, __gnat_malloc (size=136) at
/opt/cfarm/release/4.4.1/lib/gcc/x86_64-unknown-linux-gnu/4.4.1/adainclude/s-memory.adb:74
74Actual_Size : size_t := Size;
(gdb) fin
Run till exit from #0  __gnat_malloc (size=136) at
/opt/cfarm/release/4.4.1/lib/gcc/x86_64-unknown-linux-gnu/4.4.1/adainclude/s-memory.adb:74
0x0043fd5d in main () at main.adb.dg:22
22 P2b : constant double_free__test_class_access := new
Value returned is $1 = (system.address) 0x563010
(gdb) c
Continuing.

Breakpoint 6, __gnat_free (ptr=(system.address) 0x563020) at
/opt/cfarm/release/4.4.1/lib/gcc/x86_64-unknown-linux-gnu/4.4.1/adainclude/s-memory.adb:114
114  Abort_Defer.all;
(gdb) q
The program is running.  Exit anyway? (y or n) y

I'm trying with trunk just to see if it's still there.


-- 

laurent at guerby dot net changed:

   What|Removed |Added

 CC||laurent at guerby dot net
 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
  Known to fail||4.4.1
   Priority|P4  |P3
   Last reconfirmed|-00-00 00:00:00 |2009-09-24 15:51:41
   date||
Summary|[4.4 regression]|[4.4 regression]
   |Unchecked_Deallocation  |Unchecked_Deallocation
   |causes double-free errors   |causes wrong free errors


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



[Bug ada/41100] [4.4/4.5 regression] Unchecked_Deallocation causes wrong free errors

2009-09-24 Thread laurent at guerby dot net


--- Comment #5 from laurent at guerby dot net  2009-09-24 16:48 ---
Same issue on x86_64-linux with gcc version 4.5.0 20090924 (experimental)
[trunk revision 152124] (GCC) 


-- 

laurent at guerby dot net changed:

   What|Removed |Added

   Keywords||wrong-code
  Known to fail|4.4.1   |4.4.1 4.5.0
Summary|[4.4 regression]|[4.4/4.5 regression]
   |Unchecked_Deallocation  |Unchecked_Deallocation
   |causes wrong free errors|causes wrong free errors


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



[Bug fortran/41459] Error not printed with -Werror and -fmax-errors=1

2009-09-24 Thread kargl at gcc dot gnu dot org


--- Comment #2 from kargl at gcc dot gnu dot org  2009-09-24 16:49 ---
I have a patch.


-- 

kargl at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |kargl at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-09-24 16:49:38
   date||


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



[Bug bootstrap/41405] [4.5 Regression] Bootstrap fails on *-apple-darwin* due to revision 151815

2009-09-24 Thread rth at gcc dot gnu dot org


--- Comment #64 from rth at gcc dot gnu dot org  2009-09-24 17:02 ---
Subject: Bug 41405

Author: rth
Date: Thu Sep 24 17:02:29 2009
New Revision: 152127

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=152127
Log:
PR bootstrap/41405
* common.opt: Initialize dwarf_strict to -1.
* toplev.c (process_options): Catch unset dwarf_strict
and set to 0 for all targets not overriding.
* config/darwin.c (darwin_override_options): Catch unset
dwarf_strict and override to 1.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/common.opt
trunk/gcc/config/darwin.c
trunk/gcc/toplev.c


-- 


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



[Bug c/41462] New: redundant instructions with long double returned value

2009-09-24 Thread yuri at tsoft dot com
When I compile this function:
double f(long double i) {return (i);}
with gcc flags -S -O3, I get the assembly below.

There are two redundant FPU instructions there. double value is already in FPU
after fldt. No need to store it and load it back since difference between
double and long double is only in memory representation, and in FPU registers
they are the same.

 asm output (relevant part) 
f:
pushl   %ebp
movl%esp, %ebp
subl$8, %esp    redundant related stack adjustment
fldt8(%ebp)
fstpl   -8(%ebp)    redundant STORE
fldl-8(%ebp)    redundant LOAD
leave
ret


-- 
   Summary: redundant instructions with long double returned value
   Product: gcc
   Version: 4.4.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: yuri at tsoft dot com


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



[Bug c/41462] redundant instructions with long double returned value

2009-09-24 Thread yuri at tsoft dot com


--- Comment #1 from yuri at tsoft dot com  2009-09-24 17:25 ---
Forgot to mention: 32-bit mode on i586 CPU.


-- 


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



[Bug ada/41100] [4.4/4.5 regression] Unchecked_Deallocation causes wrong free errors

2009-09-24 Thread laurent at guerby dot net


--- Comment #6 from laurent at guerby dot net  2009-09-24 17:44 ---
Eric, do you have an idea on what could be wrong here? -gnatDG output looks
fine, the bug is present at all optimization level so may be it's gigi?


-- 

laurent at guerby dot net changed:

   What|Removed |Added

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


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



[Bug fortran/41459] Error not printed with -Werror and -fmax-errors=1

2009-09-24 Thread kargl at gcc dot gnu dot org


--- Comment #3 from kargl at gcc dot gnu dot org  2009-09-24 18:35 ---
http://gcc.gnu.org/ml/gcc-patches/2009-09/msg01739.html


-- 


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



[Bug libstdc++/41448] std::sort on std::vectorfloat with certain values leads to segfault in the vector destructor

2009-09-24 Thread 4ernov at gmail dot com


--- Comment #7 from 4ernov at gmail dot com  2009-09-24 18:39 ---
Is there anything in C++ Standard concerning this case?
Maybe it's more preferrable to throw exception or something like this.. Now it
seems to make memory leak in the operated vector.

The output is like this:
*** glibc detected *** /usr/local/share/workspace/playground/gcc_sort:
munmap_chunk(): invalid pointer: 0x01d2c550 ***
*** glibc detected *** /usr/local/share/workspace/playground/gcc_sort:
malloc(): memory corruption: 0x01d2bca0 ***


-- 


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



[Bug target/41456] unrecognized R constraint: R13

2009-09-24 Thread dj at gcc dot gnu dot org


--- Comment #1 from dj at gcc dot gnu dot org  2009-09-24 20:40 ---
Subject: Bug 41456

Author: dj
Date: Thu Sep 24 20:40:36 2009
New Revision: 152144

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=152144
Log:
PR target/41456
* config/m32c/m32c.h (REG_CLASS_CONTENTS): Add R13.
(reg_class): Likewise.
(REG_CLASS_NAMES): Likewise.
* config/m32c/m32c.c (m32c_reg_class_from_constraint): Likewise.

* config/m32c/m32c.c (m32c_override_options): Disable -fivopts for
M32C.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/m32c/m32c.c
trunk/gcc/config/m32c/m32c.h


-- 


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



[Bug target/41456] unrecognized R constraint: R13

2009-09-24 Thread dj at redhat dot com


-- 

dj at redhat dot com changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |dj at redhat dot com
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-09-24 20:42:26
   date||


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



[Bug middle-end/41435] GCC doesn't fold complex int division

2009-09-24 Thread ghazi at gcc dot gnu dot org


--- Comment #3 from ghazi at gcc dot gnu dot org  2009-09-24 20:45 ---
Subject: Bug 41435

Author: ghazi
Date: Thu Sep 24 20:44:55 2009
New Revision: 152145

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=152145
Log:
PR middle-end/41435
* fold-const.c (const_binop): Handle complex int division.
* tree-complex.c (expand_complex_div_straight,
expand_complex_div_wide): Update comments.

testsuite:
* gcc.dg/torture/builtin-math-7.c: Test complex int division at
compile-time.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/torture/builtin-math-7.c
trunk/gcc/tree-complex.c


-- 


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



[Bug other/39888] TLS emutls not linked to automatically on Darwin

2009-09-24 Thread developer at sandoe-acoustics dot co dot uk


--- Comment #29 from developer at sandoe-acoustics dot co dot uk  
2009-09-24 20:55 ---
Created an attachment (id=18644)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18644action=view)
updated patch for 4-5 trunk

(i) the added .ver files are (as yet) unchanged - so some newer (last few
months) symbols would be missing.
(ii) I seem to do = 1.5 so the thing should also work out of the box on 10.6
***providing*** none of the newer symbols have been already added to 10.6
libSystem.dylib.  From comments here: libSystem only subsumes the symbols from
10.5's libgcc_s so we should be good to go.
(iii) it's hidden behind the -muse-shared-libgcc-ext for test purposes.
(iv) you will need to add DYLD_LIBRARY_PATH entries pointing to gcc and
gcc/64bit if you want to play with it uninstalled.
(v) I'm about to regtest with 152135 with this patch applied and -muse- but
that's tomorrow for a result.
(vi) good luck ;)


-- 


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



[Bug middle-end/41463] New: Another get_ref_base_and_extent problem

2009-09-24 Thread jamborm at gcc dot gnu dot org
The testcase below aborts when compiled with -O2.  


union tree_node;


struct tree_common 
{
  int a;
  long b;
  long c;
  void *p;
  int d;
};

struct other_tree
{
  struct tree_common common;
  int arr[14];
};

struct tree_vec
{
  struct tree_common common;
  int length;
  union tree_node *a[1];
};

union tree_node
{
  struct other_tree othr;
  struct tree_vec vec;
};

union tree_node global;

union tree_node * __attribute__((noinline))
foo (union tree_node *p, int i)
{
  union tree_node **q;
  p-vec.a[i] = (union tree_node *) 0;
  q = p-vec.a[1];
  *q = global;
  return p-vec.a[i];
}

extern void abort (void);
extern void *malloc (__SIZE_TYPE__);

int
main()
{
  union tree_node *p = malloc (sizeof (union tree_node));
  if (foo (p, 1) != global)
abort ();
  return 0;
}


foo() is optimized to return NULL, most probably because
get_ref_base_and_extent does not recognize that accesses to a do not
necessarily have to have constant max_size.

I have tried with trunk revision 152041 and 152147.  The latter
specifically is:

jamb...@gcc16:~/gcc/test$ ~/gcc/inst/trunk/bin/gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /home/jamborm/gcc/trunk/configure
--prefix=/home/jamborm/gcc/inst/trunk/ --enable-checking=release
--enable-languages=c,c++ --disable-bootstrap --with-mpfr=/opt/cfarm/mpfr-2.3.2/
--disable-multilib
Thread model: posix
gcc version 4.5.0 20090924 (experimental) (GCC)


-- 
   Summary: Another get_ref_base_and_extent problem
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jamborm 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=41463



[Bug bootstrap/41395] [4.5 regression] Revision 151800 failed bootstrap

2009-09-24 Thread jamborm at gcc dot gnu dot org


--- Comment #31 from jamborm at gcc dot gnu dot org  2009-09-24 22:53 
---
(In reply to comment #29)
 Thanks. With the patch fixing the problem described in #24, we get
 further when compiling with release checking but run into syntax
 errors when compiling stage3 libstc++.

This problem with a reduced testcase is PR 41463.

 And the debug info is still
 corrupted.  So I am going to investigate further.
 

The debug info may not necessarily be corrupted, it's probably that the old gdb
cannot handle it.  I will try with a new gdb.


-- 

jamborm at gcc dot gnu dot org changed:

   What|Removed |Added

  BugsThisDependsOn||41463


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



[Bug tree-optimization/41464] New: vector loads are unnecessarily split into high and low loads

2009-09-24 Thread nmiell at comcast dot net
gcc (GCC) 4.4.1 20090725 (Red Hat 4.4.1-2)

The testcase (built with -Wall -O3):

#include math.h

void MulPi(float * __attribute__((aligned(16))) i, float *
__attribute__((aligned(16))) f, int n)
{
for (int j = 0; j  n; j++)
f[j] = (float) M_PI * i[j];
}

produces the following for the vectorized version of the loop:

.L7:
movaps  %xmm1, %xmm0# zero XMM0
incl%ecx
movlps  (%rdi,%rax), %xmm0  # load the low half into XMM0
movhps  8(%rdi,%rax), %xmm0 # load the high half into XMM0
mulps   %xmm2, %xmm0# multiply by pi
movaps  %xmm0, (%rsi,%rax)  # store to memory
addq$16, %rax
cmpl%r8d, %ecx
jb  .L7


-- 
   Summary: vector loads are unnecessarily split into high and low
loads
   Product: gcc
   Version: 4.4.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nmiell at comcast dot net
 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=41464



[Bug other/39888] TLS emutls not linked to automatically on Darwin

2009-09-24 Thread howarth at nitro dot med dot uc dot edu


--- Comment #32 from howarth at nitro dot med dot uc dot edu  2009-09-24 
23:47 ---
Created an attachment (id=18645)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18645action=view)
build failure on x86_64-apple-darwin10


-- 


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



[Bug bootstrap/41465] bootstrap failed - ../libdecnumber/gstdint.h:80: error: two or more data types in declaration specifiers

2009-09-24 Thread htl10 at users dot sourceforge dot net


--- Comment #1 from htl10 at users dot sourceforge dot net  2009-09-24 
23:51 ---
int64_t and uint64_t are both already defined in /usr/include/inttypes.h - 
it appears that intmax_t and uintmax_t may also be defined elsewhere as well,
although I couldn't locate it.


-- 


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



[Bug bootstrap/41465] bootstrap failed - ../libdecnumber/gstdint.h:80: error: two or more data types in declaration specifiers

2009-09-24 Thread htl10 at users dot sourceforge dot net


--- Comment #2 from htl10 at users dot sourceforge dot net  2009-09-24 
23:56 ---
(In reply to comment #1)
 int64_t and uint64_t are both already defined in /usr/include/inttypes.h - 
 it appears that intmax_t and uintmax_t may also be defined elsewhere as well,
 although I couldn't locate it.

I thought I should explain the 2nd sentence a bit - I tried cleaning the
relevant bit out and leaving just these two:

typedef long  intmax_t;
typedef unsigned long uintmax_t;

and compilation failed with a message about 'long long long' and 'unsigned long
long long'. So it appears that intmax_t was expanded to 'long long' along the
way.


-- 


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



[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-24 Thread mikulas at artax dot karlin dot mff dot cuni dot cz


--- Comment #46 from mikulas at artax dot karlin dot mff dot cuni dot cz  
2009-09-25 00:56 ---
Created an attachment (id=18646)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18646action=view)
A patch for gcc 4.4.1

I decided to make a patch on my own. Seamonkey works with it. It sometimes
aligns unnecessarily but it should never miss an alignment. (someone with more
knowledge about gcc than me could refine the patch to make fewer unneeded
alignments) I searching the generated seamonkey code for 'movaps.*esp' and it
shows that all the functions that store xmm on the stack use stack alignment.


-- 


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



[Bug other/39888] TLS emutls not linked to automatically on Darwin

2009-09-24 Thread howarth at nitro dot med dot uc dot edu


--- Comment #34 from howarth at nitro dot med dot uc dot edu  2009-09-25 
01:20 ---
Iain,
The build on i686-apple-darwin10 is going better but has a glitch. A no
time during the different stages of the bootstrap are libgcc_s.10.4.dylib and
libgcc_s.10.5.dylib created. For example, in stage1-gcc I have...

libgcc_ext.10.4.dylib   libgcc_ext.10.5.dylib   libgcc_s.1.dylib   
libgcc_s_ppc64.1.dylib  libgcc_s_x86_64.1.dylib

whereas a build without the libgcc-ext patch shows

libgcc_s.1.dyliblibgcc_s.10.4.dylib libgcc_s.10.5.dylib
libgcc_s_ppc64.1.dylib  libgcc_s_x86_64.1.dylib

I'll attach a compressed build log once the bootstrap is complete.


-- 


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



[Bug other/39888] TLS emutls not linked to automatically on Darwin

2009-09-24 Thread howarth at nitro dot med dot uc dot edu


--- Comment #35 from howarth at nitro dot med dot uc dot edu  2009-09-25 
02:19 ---
Created an attachment (id=18647)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18647action=view)
i686-apple-darwin10 build log with patch


-- 


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



[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2009-09-24 Thread hjl dot tools at gmail dot com


--- Comment #47 from hjl dot tools at gmail dot com  2009-09-25 02:31 
---
(In reply to comment #46)
 Created an attachment (id=18646)
 -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18646action=view) [edit]
 A patch for gcc 4.4.1
 
 I decided to make a patch on my own. Seamonkey works with it. It sometimes
 aligns unnecessarily but it should never miss an alignment. (someone with more
 knowledge about gcc than me could refine the patch to make fewer unneeded
 alignments) I searching the generated seamonkey code for 'movaps.*esp' and it
 shows that all the functions that store xmm on the stack use stack alignment.
 

You can find a testcase as the first step.


-- 


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



[Bug bootstrap/40894] [4.4/4.5 Regression] bootstrap4-lean failed crtfastmath.o comparision

2009-09-24 Thread htl10 at users dot sourceforge dot net


--- Comment #4 from htl10 at users dot sourceforge dot net  2009-09-25 
04:33 ---
situation gone worse:

make[3]: Leaving directory `/home/htl10/tmp-build/ob-dir'
Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1obj-checksum.o differs
Bootstrap comparison failure!
gcc/java/win32-host.o differs
gcc/build/min-insn-modes.o differs
gcc/dummy-checksum.o differs
gcc/insn-peep.o differs
gcc/graphite-blocking.o differs
gcc/graphite-clast-to-gimple.o differs
gcc/graphite-dependences.o differs
gcc/graphite-interchange.o differs
gcc/graphite-poly.o differs
gcc/graphite-ppl.o differs
gcc/graphite-scop-detection.o differs
gcc/graphite-sese-to-poly.o differs
gcc/loop-doloop.o differs
gcc/version.o differs
gcc/vmsdbgout.o differs
gcc/xcoffout.o differs
gcc/host-default.o differs
gcc/gcc-options.o differs
gcc/collect2-aix.o differs
intl/osdep.o differs
libiberty/safe-ctype.o differs
make[2]: *** [compare] Error 1
make[2]: Leaving directory `/home/htl10/tmp-build/ob-dir'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/home/htl10/tmp-build/ob-dir'
make: *** [bootstrap4-lean] Error 2
bash-2.05a# 


-- 

htl10 at users dot sourceforge dot net changed:

   What|Removed |Added

Summary|[4.4 Regression] bootstrap4-|[4.4/4.5 Regression]
   |lean failed crtfastmath.o   |bootstrap4-lean failed
   |comparision |crtfastmath.o comparision


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



[Bug bootstrap/40894] [4.4/4.5 Regression] bootstrap4-lean failed crtfastmath.o comparision

2009-09-24 Thread htl10 at users dot sourceforge dot net


--- Comment #5 from htl10 at users dot sourceforge dot net  2009-09-25 
04:40 ---
latest run was with svn-r152154 . also filed new bug 41465 , I just noticed I
wrote 'bootstrap-lean' in comment 2 instead of 'bootstrap4-lean' - it is
probably not important in light of the new bug and more extensive failures.


-- 


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



[Bug c++/41437] No access control for classes in template functions

2009-09-24 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2009-09-25 04:44 ---
I think this is a duplicate of bug 40843.


-- 


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