[Bug fortran/49074] [OOP] Defined assignment w/ CLASS arrays: Incomplete error message

2011-05-20 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49074

Tobias Burnus  changed:

   What|Removed |Added

   Keywords||diagnostic
 CC||burnus at gcc dot gnu.org
Summary|Incomplete error message|[OOP] Defined assignment w/
   ||CLASS arrays: Incomplete
   ||error message

--- Comment #1 from Tobias Burnus  2011-05-20 
06:56:01 UTC ---
(Program compiles with ifort 12, but segfaults at run time.)


[Bug c++/49073] g++ optimizer breaks do-while code

2011-05-20 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49073

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.05.20 06:57:01
 CC||jakub at gcc dot gnu.org
Version|4.5.2   |4.6.0
 Ever Confirmed|0   |1

--- Comment #1 from Jakub Jelinek  2011-05-20 
06:57:01 UTC ---
Confirmed for 4.6 and trunk, if you can reproduce it with 4.5, complain to
Ubuntu for backporting very risky patch that caused already more than one
regression.

Caused by http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160445

Simplified testcase:
extern void abort (void);
int c;

int
main ()
{
  int a[] = { 1, 2, 3, 4, 5, 6, 7 }, d = 1, i = 1;
  _Bool f = 0;
  do
{
  d = a[i];
  if (f && d == 4)
{
  ++c;
  break;
}
  i++;
  f = (d == 3);
}
  while (d < 7);
  if (c != 1)
abort ();
  return 0;
}

I'll have a look.


[Bug fortran/49076] New: ASSOCIATE: Array descriptor passed to explicit-shaped dummy

2011-05-20 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49076

   Summary: ASSOCIATE: Array descriptor passed to explicit-shaped
dummy
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: bur...@gcc.gnu.org
CC: do...@gcc.gnu.org


Reported by Andrew Baldwin at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/b1ff1e3da48e6b27

The following program prints with gfortran:

3   4
3   4
 33275912   0

With ifort 12 - and reportedly with NAG 5.2, it prints:
   3   4
   3   4
   3   4

If one looks at the dump, one sees that in associated the function is called
as:

print_int (&bar);

That's both the case for the explicit-shape "i(2)" and for an assumed-shape
"i(:)". As "&bar" is the address of the descriptor, it works with assumed-shape
arrays - and fails with assumed-size/explicit-size arrays.


   subroutine print_int (i)
 integer, intent (in) :: i(2)

 print *, i
   end subroutine print_int

   program main
 interface
   subroutine print_int (i)
 integer, intent (in) :: i(2)
   end subroutine print_int
 end interface

 integer, allocatable :: foo(:,:)

 allocate (foo(2,2))
 foo(:,1) = [1, 2]
 foo(:,2) = [3, 4]

 call print_int (foo(:,2))

 associate (bar => foo(:,2))

 print *, bar

 call print_int (bar)

 end associate
   end program


[Bug c++/49073] g++ optimizer breaks do-while code

2011-05-20 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49073

--- Comment #2 from Jakub Jelinek  2011-05-20 
07:50:02 UTC ---
I think the bug is fairly obviously in and_comparisons_1 (and also in
or_comparisons_1), going through a PHI node needs to be done with lots of care.
We have:
:
  # i_1 = PHI <1(2), i_9(6)>
  # f_2 = PHI <0(2), f_10(6)>
  d_6 = a[i_1];
  if (f_2 != 0)
goto ;
  else
goto ;
:
  if (d_6 == 4)
goto ;
  else
goto ;
:
  c.0_7 = c;
  c.1_8 = c.0_7 + 1;
  c = c.1_8;
  goto ;
:
  i_9 = i_1 + 1;
  f_10 = d_6 == 3;
  if (d_6 <= 6)
goto ;
  else
goto ;

and_comparisons_1 is called here with f_2 != 0 and d_6 == 4, it sees that
f_2 is a result of a PHI node, and performs as the comment says:
/* If every argument to the PHI produces the same result when
   ANDed with the second comparison, we win.  */
First PHI argument is 0, so it is 0 && d_6 == 4 then, and for the second case
it mistakenly follows on the SSA_NAME argument of the PHI, so f_10 and d_6 == 4
and we recurse into and_comparisons_1 with d_6 == 3 and d_6 == 4, which is of
course false.  The bug is that each of the d_6's is from a different loop
iteration.

So I think we need to give up if PHI argument is an SSA_NAME which might be
defined in a different iteration of a loop, probably some dominance checks
between the bb the PHI is defined and bb where the SSA_NAME is defined.


[Bug target/48252] ARM neon: problem with consecutive vzip, vuzp and vtrn

2011-05-20 Thread irar at il dot ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48252

Ira Rosen  changed:

   What|Removed |Added

 CC||hules at free dot fr

--- Comment #10 from Ira Rosen  2011-05-20 07:52:14 UTC 
---
*** Bug 49061 has been marked as a duplicate of this bug. ***


[Bug target/46072] AIX linker chokes on debug info for uninitialized static variables

2011-05-20 Thread mrgcc at mailinator dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46072

mrgcc at mailinator dot com changed:

   What|Removed |Added

 CC||mrgcc at mailinator dot com

--- Comment #31 from mrgcc at mailinator dot com 2011-05-20 08:02:27 UTC ---
Hi *,

just my 2 cents

>From my poor understanding, to mee this seems like an "as" issue.
>From the same .s input the "old" and "new" as produces different .o files.
The dump util on the two .o shows more clear what the linker tries to say

testcode:
static int globstat;
int main() { static int innerstat; return 0;}
new as:

[48]m   0x 1 00x8f 0x .bs
-^
should be pointing to 68 = 0x44
and is illegal according to the specs
[49]m   0x0004-2 00x85 0x innerstat:V3
[50]m   0x 1 00x90 0x .es
[51]m   0x0010 1 10x64 0x .eb
[52]a1   2 0 0   0   0
[53]m   0x0020 1 10x65 0x .ef
[54]a1   0 2 0   0   0
[55]m   0x 1 00x8f 0x .bs
-^
[56]m   0x-2 00x85 0x globstat:S3
[57]m   0x 1 00x90 0x .es
[58]m   0x0038 2 10x6b 0x _test.rw_
[59]a4  0x   00 25500
[60]m   0x0038 2 10x6b 0x main
[61]a4  0x000c   00 17   1000
[62]m   0x0038 2 10x02 0x main
[63]a4  0x003c   00  2   1000
[64]m   0x0048 2 10x6b 0x .data
[65]a4  0x0004   00 25500
[66]m   0x004c 2 10x6b 0x TOC
[67]a4  0x   00 17   1500
[68]m   0x004c 3 10x6b 0x _test.bss_
[69]a4  0x0008   00 19900


old as:

[48]m   0x0044 1 00x8f 0x .bs
-^
IS pointing to 68 = 0x44
[49]m   0x0004-2 00x85 0x innerstat:V3
[50]m   0x 1 00x90 0x .es
[51]m   0x0010 1 10x64 0x .eb
[52]a1   0 1 0   0   0
[53]m   0x0020 1 10x65 0x .ef
[54]a1   0 2 0   0   0
[55]m   0x0044 1 00x8f 0x .bs
-^
[56]m   0x-2 00x85 0x globstat:S3
[57]m   0x 1 00x90 0x .es
[58]m   0x0038 2 10x6b 0x _test.rw_
[59]a4  0x   00 25500
[60]m   0x0038 2 10x6b 0x main
[61]a4  0x000c   00 17   1000
[62]m   0x0038 2 10x02 0x main
[63]a4  0x003c   00  2   1000
[64]m   0x0048 2 10x6b 0x .data
[65]a4  0x0004   00 25500
[66]m   0x004c 2 10x6b 0x TOC
[67]a4  0x   00 17   1500
[68]m   0x004c 3 10x6b 0x _test.bss_
[69]a4  0x0008   00 19900

Everything else is created in the object file (.bss .debug)
AFAIK the _test.bss_ csect is an outcome of the .lcomm pseudo-op

When adding a .csect _test.bss_[BS] the csect index in the toc is still 0. Even
worse: i get a duplicate toc entry for _test.bss_

I could add a new csect before each .bs to make it linkable, but gdb doesn't
find the stabs then...

Btw: this as issue doesn't seem new:
http://www.opensource.apple.com/source/cc/cc-798/cc/xcoffout.h
 see #define DBX_STATIC_BLOCK_START
http://www.opensource.apple.com/source/gcc/gcc-934.3/gcc/README.RS6000
 see AIX 4.3.0 assembler


[Bug target/49061] wrong code with ARM NEON intrinsics

2011-05-20 Thread irar at il dot ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49061

Ira Rosen  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE

--- Comment #3 from Ira Rosen  2011-05-20 07:52:13 UTC 
---
Good, I am closing the pr then.

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


[Bug tree-optimization/45978] [4.6 Regression] bogus "array subscript is above array bounds" warning in extremely simple code with no loops

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45978

Richard Guenther  changed:

   What|Removed |Added

  Known to work||4.7.0
Summary|[4.6/4.7 Regression] bogus  |[4.6 Regression] bogus
   |"array subscript is above   |"array subscript is above
   |array bounds" warning in|array bounds" warning in
   |extremely simple code with  |extremely simple code with
   |no loops|no loops

--- Comment #6 from Richard Guenther  2011-05-20 
08:19:59 UTC ---
The bug was indeed worked around in VRP by making it use the CCP engine.
It now sees

  MEM[(struct Y *)& + 16B] = vect_cst_.6_11;

instead of &MEM[(struct Y *)&].ar[4] as a base which makes it not warn.

The vectorizer still uses that address as base though.

So I suppose we can say it's fixed in 4.7 by adjusting the pass that
emits the warning.


[Bug c++/49021] [4.6 regression] BOOST_FOREACH over vector segfaults at runtime

2011-05-20 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49021

--- Comment #8 from Mikael Pettersson  2011-05-20 
08:27:39 UTC ---
I'm trying to reduce the preprocessed test case, but since I'm not a C++ person
this might take some time.


[Bug fortran/48706] Type extension inside subroutine

2011-05-20 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48706

janus at gcc dot gnu.org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot   |janus at gcc dot gnu.org
   |gnu.org |

--- Comment #4 from janus at gcc dot gnu.org 2011-05-20 08:45:59 UTC ---
(In reply to comment #3)
> Early patch (not regtested):

The patch in comment #3 regtests successfully.


[Bug c++/49021] [4.6 regression] BOOST_FOREACH over vector segfaults at runtime

2011-05-20 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49021

--- Comment #9 from Mikael Pettersson  2011-05-20 
09:05:31 UTC ---
(In reply to comment #8)
> I'm trying to reduce the preprocessed test case, but since I'm not a C++ 
> person
> this might take some time.

Scratch that, the preprocessed code is way too weird for me.


[Bug c++/47873] [4.6 Regression] virtual Inheritance - Covariant Virtual Function - Segfault

2011-05-20 Thread isahib at xtra dot co.nz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47873

--- Comment #13 from Ibaidul Sahib  2011-05-20 
09:29:00 UTC ---
(In reply to comment #12)
> Fixed.

Thanks I have tested this and the bug is fixed.

ggc-4.6 -v
==
gcc version 4.6.1 20110329 (prerelease) (Debian 4.6.0-2) 

uname -a

Linux debian 2.6.38-2-amd64 #1 SMP Sun May 8 13:51:57 UTC 2011 x86_64 GNU/Linux

BTW who is responsible for changing the bug report Status to Verified/Closed,
QA or me?


[Bug fortran/48706] Type extension inside subroutine

2011-05-20 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48706

--- Comment #5 from Tobias Burnus  2011-05-20 
09:35:30 UTC ---
(In reply to comment #4)
> The patch in comment #3 regtests successfully.

Patch looks OK.
Thus, you can commit it with a test case and a changelog - and with posting the
patch to gcc-patches@/fortran@.

Thanks for fixing the PR.


[Bug c/49068] Failure to auto-cast in expression, results in broken code

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49068

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #3 from Richard Guenther  2011-05-20 
09:40:25 UTC ---
&jape + 3 doesn't do what you think.


[Bug tree-optimization/49073] [4.6/4.7 Regression] g++ optimizer breaks do-while code

2011-05-20 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49073

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|--- |4.6.1
Summary|g++ optimizer breaks|[4.6/4.7 Regression] g++
   |do-while code   |optimizer breaks do-while
   ||code


[Bug middle-end/48849] [4.7 Regression] SPEC CPU 2000/2006 failed to build with LTO

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48849

--- Comment #7 from Richard Guenther  2011-05-20 
09:35:47 UTC ---
Author: rguenth
Date: Fri May 20 09:35:44 2011
New Revision: 173939

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173939
Log:
2011-05-20  Richard Guenther  

PR middle-end/48849
* gimple.c (gimple_register_canonical_type): Compute TYPE_CANONICAL
of pointer types the same way the middle-end does.

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


[Bug c++/49021] [4.6 regression] BOOST_FOREACH over vector segfaults at runtime

2011-05-20 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49021

--- Comment #10 from Jonathan Wakely  2011-05-20 
09:48:42 UTC ---
(In reply to comment #9)
> (In reply to comment #8)
> > I'm trying to reduce the preprocessed test case, but since I'm not a C++ 
> > person
> > this might take some time.
> 
> Scratch that, the preprocessed code is way too weird for me.

welcome to Boost MPL!  ;)

there are huge chunks that can be removed (iostreams and locales,
reverse_iterators) but reducing it manually is not easy.

See http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction for a tool to do it
automatically


[Bug target/49030] ICE in get_arm_condition_code, at config/arm/arm.c:17180

2011-05-20 Thread ibolton at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49030

Ian Bolton  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2011.05.20 09:50:09
 CC||ibolton at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from Ian Bolton  2011-05-20 09:50:09 
UTC ---
I haven't been able to reproduce this.  Please can you include the args that
are being sent to cc1.


[Bug c/49077] New: gcjwebplugin.cc doesn't compile against latest xulrunner 2.0b13 sdk

2011-05-20 Thread jason.vas.dias at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49077

   Summary: gcjwebplugin.cc doesn't compile against latest
xulrunner 2.0b13 sdk
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: jason.vas.d...@gmail.com


When attempting to build gcc-4.6.0 with libjava, AWT peers, and browser plugin,
 gcjwebplugin.cc does not compile because these headers are missing from
 xulrunner-2.0b13 (the latest stable mozilla build, but checked out out from
HG):
   nsIPluginInstancePeer.h
   nsIPluginTagInfo2.h
 These exist only in my previous xulrunner directory :
  /usr/include/xulrunner-1.9.0.12pre/unstable/nsIPluginInstancePeer.h
 I don't think the gappletviewer should be choosing to use the 'unstable' API !
Since I've removed the old versions of xulrunner, I'll have to port
gappletviewer
to use the new xulrunner API, and will post patch here when done, unless
someone
has already done it ? If so, please post patch or tell me where I can find one.
Thanks & Regards,
Jason


[Bug c/49067] Internal Compiler Error with -O3

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49067

Richard Guenther  changed:

   What|Removed |Added

  Known to work||4.5.2
  Known to fail||4.5.3

--- Comment #1 from Richard Guenther  2011-05-20 
09:56:39 UTC ---
I can confirm

> /space/rguenther/install/gcc-4.5.3/bin/gcc -O3 -fno-strict-aliasing -S t.i
/home/fcf/blender-svn/blender/source/blender/editors/space_view3d/view3d_select.c:
In function 'view3d_circle_select_exec':
/home/fcf/blender-svn/blender/source/blender/editors/space_view3d/view3d_select.c:2235:12:
internal compiler error: in get_constraint_for_component_ref, at
tree-ssa-structalias.c:3035
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

which is a regression from 4.5.2.  So I suppose Ubuntu has backported
some patches.

Reducing.


[Bug target/49069] ICE in gen_cstoredi4, at config/arm/arm.md:7554

2011-05-20 Thread ibolton at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49069

Ian Bolton  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.05.20 10:05:11
 CC||ibolton at gcc dot gnu.org
 Ever Confirmed|0   |1
  Known to fail||4.7.0

--- Comment #1 from Ian Bolton  2011-05-20 10:05:11 
UTC ---
Confirmed.  Fails for ARM and Thumb.

Here's my compiler command-line:

cc1 -fpreprocessed 49069.i -quiet -dumpbase 49069.i -marm -mcpu=cortex-a9
-mfloat-abi=softfp -mfpu=vfpv3-d16 -auxbase 49069 -Os -version -o 49069.s

This has actually been broken since at least r164700 (I had some old toolchains
available to try), so I expect 4.6.0 is broken too, but I don't have time to
confirm at the moment.


[Bug java/49077] gcjwebplugin.cc doesn't compile against latest xulrunner 2.0b13 sdk

2011-05-20 Thread jason.vas.dias at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49077

--- Comment #1 from Jason Vas Dias  2011-05-20 
10:07:20 UTC ---
my config:

  $ /usr/build2/gcc/gcc-4.6.0/configure --prefix=/usr --libdir=/usr/lib64\
--with-cpu-32=i686 --with-cpu-64=k8 --enable-languages=all \
--enable-targets=all --enable-multilib --enable-threads=posix --enable-tls\
--enable-lto --enable-shared --enable-checking=release \
--with-build-time-tools=/usr/bin --with-ld=/usr/bin/ld --with-gnu-ld \
--with-as=/usr/bin/as --with-gnu-as --enable-__cxa_atexit \
--disable-libunwind-exceptions --with-gxx-include-dir=/usr/include/c++\
--enable-version-specific-runtime-libs --with-system-zlib --disable-werror\
--enable-classpath --with-x --enable-gtk-cairo --enable-java-awt=gtk,xlib\
--withjava-home=/usr/java --with-jvm-root-dir=/usr/java/jvm \
--with-jvm-jar-dir=/usr/java/jvm_exports --enable-browser-plugin\ 
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu \
--without-included-gettext --enable-serial-configure

with /usr/build2/gcc/gcc-4.6.0 containing GCC source identical to that shipped
in gcc-4.6.0.tar.bz2 except for this patch which I use for my distro defaults :

diff -up gcc/config/i386/linux.h~ gcc/config/i386/linux.h
--- gcc/config/i386/linux.h~2011-01-14 18:45:06.0 +
+++ gcc/config/i386/linux.h 2011-04-05 22:17:10.0 +0100
@@ -92,7 +92,7 @@ along with GCC; see the file COPYING3.

 /* These macros may be overridden in k*bsd-gnu.h and i386/k*bsd-gnu.h. */
 #define LINK_EMULATION "elf_i386"
-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER "/lib32/ld-linux.so.2"

 #undef  ASM_SPEC
 #define ASM_SPEC \
diff -up gcc/config/i386/linux64.h~ gcc/config/i386/linux64.h
--- gcc/config/i386/linux64.h~  2011-03-02 22:35:36.0 +
+++ gcc/config/i386/linux64.h   2011-04-05 22:17:33.0 +0100
@@ -62,7 +62,7 @@ see the files COPYING3 and COPYING.RUNTI
When the -shared link option is used a final link is not being
done.  */

-#define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2"
+#define GLIBC_DYNAMIC_LINKER32 "/lib32/ld-linux.so.2"
 #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2"

 #if TARGET_64BIT_DEFAULT


[Bug c++/47873] [4.6 Regression] virtual Inheritance - Covariant Virtual Function - Segfault

2011-05-20 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47873

--- Comment #14 from Jonathan Wakely  2011-05-20 
09:46:30 UTC ---
(In reply to comment #13)
> BTW who is responsible for changing the bug report Status to Verified/Closed,
> QA or me?

Don't bother, we don't use that status - RESOLVED+FIXED is all that's needed


[Bug tree-optimization/49064] [x86/x64]: broken alias analysis leads vectorizer to emit poor code

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49064

Richard Guenther  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org

--- Comment #2 from Richard Guenther  2011-05-20 
10:03:32 UTC ---
Only type-based aliasing is disabled (which is required).  The testcase
does not compile for me, please provide something complete.


[Bug tree-optimization/49073] [4.6/4.7 Regression] g++ optimizer breaks do-while code

2011-05-20 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49073

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |jakub at gcc dot gnu.org
   |gnu.org |

--- Comment #3 from Jakub Jelinek  2011-05-20 
09:47:43 UTC ---
Created attachment 24297
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24297
gcc46-pr49073.patch

Untested fix.

While I can imagine a testcase where the dominated_by_p CDI_DOMINATORS check
isn't sufficient, e.g. when a loop is entered in the middle as well, as
and_var_* and or_var_* immediately give up if the def stmt isn't a
GIMPLE_ASSIGN and I believe we need a GIMPLE_PHI in that case, it should
hopefully be enough this way.

Just for completeness, here is what I've been trying with -O2 -fno-tree-vrp:

extern void abort (void);
int c;
volatile int v;

__attribute__((noinline, noclone)) int
foo (int x)
{
  int a[] = { 1, 2, 3, 4, 5, 6, 7 }, d = 1, i = 1;
  _Bool f = 0;
  if (x == -1000)
goto lab;
  do
{
  v++;
lab:
  d = a[i];
  if (f && d == 4)
{
  ++c;
  break;
}
  i++;
  f = (d == 3);
}
  while (d < 7);
  if (c != 1)
abort ();
  return 0;
}

int
main ()
{
  foo (v);
  return 0;
}


[Bug rtl-optimization/49034] ARM optimizer generating incorrect code (causing bad pointer dereference)

2011-05-20 Thread ramana at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49034

Ramana Radhakrishnan  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2011.05.20 10:20:24
 CC||ramana at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from Ramana Radhakrishnan  2011-05-20 
10:20:24 UTC ---
Please read http://gcc.gnu.org/bugs/ regarding the kind of information we need
to do anything with bugs.

 It would be useful to have some kind of pre-processed file atleast to look at
this bug and all the command line options you have used *including* the
architecture specific flags. Without that it's difficult for someone to try and
replicate this issue.

also if this is from the Android NDK you should be reporting bugs there rather
than here because that's not necessarily a bug in the FSF 4.4.0 toolchain. Can
you reproduce this issue with a later release in the FSF 4.4 branch or the FSF
4.5 branch or the 4.6 branch or even FSF trunk ? 

Ramana


[Bug tree-optimization/49067] [4.5 Regression] Internal Compiler Error with -O3

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49067

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011.05.20 10:18:43
  Component|c   |tree-optimization
Version|4.5.2   |4.5.3
 AssignedTo|unassigned at gcc dot   |rguenth at gcc dot gnu.org
   |gnu.org |
   Target Milestone|--- |4.5.4
Summary|Internal Compiler Error |[4.5 Regression] Internal
   |with -O3|Compiler Error with -O3
 Ever Confirmed|0   |1

--- Comment #2 from Richard Guenther  2011-05-20 
10:18:43 UTC ---
static inline int
armature_circle_doSelectJoint(void *userData)
{
  struct {
  void *vc;
  short select;
  int mval[2];
  float radius;
  } *data = userData;
  return (0 <= data->radius && data->select);
}
int
armature_circle_select(void)
{
  struct {
  void *vc;
  short select, mval[2];
  float radius;
  } data;
  return armature_circle_doSelectJoint(&data);
}

it's caused by the mismatch of the local struct declarations (might be a bug
in your app as well).


[Bug java/49077] gcjwebplugin.cc doesn't compile against latest xulrunner 2.0b13 sdk

2011-05-20 Thread jason.vas.dias at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49077

--- Comment #2 from Jason Vas Dias  2011-05-20 
10:17:10 UTC ---
See https://developer.mozilla.org/en/firefox_3.6_for_developers :

"Interfaces merged

The following interfaces have been combined together:

nsIPluginTagInfo2 has been merged into nsIPluginTagInfo.
nsIPluginInstanceInternal, nsIPPluginInstancePeer, nsIPluginInstancePeer1,
nsIPluginInstancePeer2, and nsIPluginInstancePeer3 have all been merged into
nsIPluginInstance.
nsIWindowlessPlugInstPeer has been merged into nsIPluginInstance.
nsIPluginManager and nsIPluginManager2 have been merged into nsIPluginHost.

"


[Bug target/49049] ICE in copyprop_hardreg_forward_1, at regcprop.c:767

2011-05-20 Thread ibolton at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49049

Ian Bolton  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.05.20 09:53:22
 CC||ibolton at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from Ian Bolton  2011-05-20 09:53:22 
UTC ---
Confirmed.  Note that it does not happen for -marm.

Full compilation command-line:

cc1 -fpreprocessed 49049.i -quiet -dumpbase 49049.i -mthumb -mcpu=cortex-a9
-mfloat-abi=softfp -mfpu=vfpv3-d16 -auxbase 49049 -O3 -version -o 49049.s


[Bug java/49077] gcjwebplugin.cc doesn't compile against latest xulrunner 2.0 (firefox-3.6) sdk

2011-05-20 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49077

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  2011-05-20 
11:00:28 UTC ---
gcjwebplugin is dead, it should have been removed, but nobody has done that.
Just don't enable it in configure.


[Bug java/49077] gcjwebplugin.cc doesn't compile against latest xulrunner 2.0 (firefox-3.6) sdk

2011-05-20 Thread jason.vas.dias at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49077

--- Comment #4 from Jason Vas Dias  2011-05-20 
11:19:25 UTC ---
Created attachment 24298
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24298
patch to gcjwebplugin.cc to compile against xulrunner-2.0

First attempt that compiles


[Bug bootstrap/49078] New: [4.7 Regression] LTO bootstrap failed with bootstrap-profiled

2011-05-20 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49078

   Summary: [4.7 Regression] LTO bootstrap failed with
bootstrap-profiled
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: hjl.to...@gmail.com
CC: rgue...@gcc.gnu.org


On Linux/x86-64, revision 173939 failed LTO bootstrap with
bootstrap-profiled:

../../src-trunk/gcc/passes.c: In function 'execute_todo':
../../src-trunk/gcc/passes.c:1256:1: internal compiler error: in get_alias_set,
at alias.c:715
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[7]: *** [/tmp/ccHRu2Jd.ltrans0.ltrans.o] Error 1
lto-wrapper: make returned 2 exit status
/usr/local/x86_64-unknown-linux-gnu/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
make[6]: *** [f951] Error 1
make[6]: *** Waiting for unfinished jobs
...

Revision 173929 is OK.


Possibly a bug

2011-05-20 Thread Abdul Wahid Memon
Hello everyone

I am sorry if this question doesn't relates to the bugs mailing list
but I think its a bug.

I posted a question on gcc-help but didn't got a useful answer yet. I
am using plugin with gcc-4.5.3.

The plugin just uses a simple number_of_loops() function. Plugin
defines 2 passes (one at GIMPEL level and the other at RTL).

GIMPLE Pass goes smoothly but at RTL, I receive an error concerning dominance.c

hello.c: In function ‘main’:
hello.c:13:1: internal compiler error: in calc_dfs_tree, at dominance.c:394
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

There are 2 functions in hello.c. Things are fine if main function
call another function (in this case called function doesn't return any
value) but
if I modify the function to return some value then I get the above
error but only in RTL pass.


[Bug tree-optimization/49079] [4.6/4.7 Regression] Bogus constant folding

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49079

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.6.1


[Bug bootstrap/49078] [4.7 Regression] LTO bootstrap failed with bootstrap-profiled

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49078

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.7.0


[Bug tree-optimization/49079] New: [4.6/4.7 Regression] Bogus constant folding

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49079

   Summary: [4.6/4.7 Regression] Bogus constant folding
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: rgue...@gcc.gnu.org


libustr testing fails because we constant fold the s2 initializer in the
following testcase despite the fact it can be modified by ustr_sc_ensure_owner.

extern void abort (void);

typedef long unsigned int size_t;

struct Ustr
{
  unsigned char data[1];
};

size_t ustr_xi__pow2(int, unsigned char);
int ustr_sized(const struct Ustr *);
int ustr_cmp_fast_buf(const struct Ustr*, const void*,size_t);
const char *ustr_cstr(const struct Ustr *);
int ustr_sc_ensure_owner(struct Ustr **);

extern inline __attribute__ ((__gnu_inline__))
size_t ustr_xi__embed_val_get(const unsigned char *data, size_t len)
{
  size_t ret = 0;

  switch (len)
{
  case 0: return (-1);

  case 8:
  ret |= (((size_t)data[7]) << 56);
  ret |= (((size_t)data[6]) << 48);
  ret |= (((size_t)data[5]) << 40);
  ret |= (((size_t)data[4]) << 32);

  case 4:
  ret |= (((size_t)data[3]) << 24);
  ret |= (((size_t)data[2]) << 16);
  case 2:
  ret |= (((size_t)data[1]) << 8);
  case 1:
  ret |= (((size_t)data[0]) << 0);

  break;

  default: abort();
}

  return (ret);
}

extern inline __attribute__ ((__gnu_inline__))
size_t ustr_len(const struct Ustr *s1)
{
  int usized;
  if (!s1->data[0])
return (0);

  usized = ustr_sized(s1);
  return (ustr_xi__embed_val_get(s1->data + 1 + ustr_xi__pow2(usized,
(s1)->data[0] >> 2),
 ustr_xi__pow2(usized, (s1)->data[0])));
}

extern inline __attribute__ ((__gnu_inline__))
int ustr_cmp_fast(const struct Ustr *s1,const struct Ustr*s2)
{
  if (s1 == s2)
return (0);


  return (ustr_cmp_fast_buf(s1, ustr_cstr(s2), ustr_len(s2)));
}


extern inline __attribute__ ((__gnu_inline__))
int ustr_cmp_eq(const struct Ustr *s1, const struct Ustr *s2)
{ return (!ustr_cmp_fast(s1, s2)); }

static struct Ustr *s2 = ((struct Ustr *) "\x01" "\x02" "s2"
"\0");

int
main()
{
  ustr_sc_ensure_owner(&s2);

  if (!ustr_cmp_eq(s2, ((struct Ustr *) "\x01" "\x0002" "s2"
"\0")))
abort ();

  return 0;
}

It seems to need the several steps of inlining to reproduce, sofar
I wasn't successfull in making a very simple testcase.  The folding
happens when inlining ustr_cmp_eq to main.


[Bug tree-optimization/49079] [4.6/4.7 Regression] Bogus constant folding

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49079

--- Comment #1 from Richard Guenther  2011-05-20 
12:34:27 UTC ---
Hm, no, it's not constant-folding from s2, I misread.


[Bug tree-optimization/49064] [x86/x64]: broken alias analysis leads vectorizer to emit poor code

2011-05-20 Thread piotr.wyderski at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49064

--- Comment #3 from Piotr Wyderski  2011-05-20 
12:50:49 UTC ---

#include 
#include 

struct X {

__m128i*m_Data;
std::size_t m_Len;

void xor_all(const X& v1, const X& v2);
void xor_all2(const X& v1, const X& v2);
};


void X::xor_all(const X& v1, const X& v2) {

for(std::size_t i = 0; i != m_Len; ++i) {

m_Data[i] = v1.m_Data[i] ^ v2.m_Data[i];
}
}

void X::xor_all2(const X& v1, const X& v2) {

__m128i* p0 = m_Data;
__m128i* p1 = v1.m_Data;
__m128i* p2 = v2.m_Data;

for(std::size_t i = 0; i != m_Len; ++i) {

p0[i] = p1[i] ^ p2[i];
}
}

$ g++ -std=gnu++0x -msse2 -O2 -DNDEBUG testcase.cpp


[Bug target/48529] [x32] Testsuite failures

2011-05-20 Thread hjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48529

--- Comment #2 from hjl at gcc dot gnu.org  2011-05-20 
12:47:16 UTC ---
Author: hjl
Date: Fri May 20 12:47:13 2011
New Revision: 173943

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173943
Log:
Use ptr_mode instead of Pmode for vtable adjustment.

2011-05-20  H.J. Lu  

PR target/48529
* config/i386/i386.c (x86_output_mi_thunk): Use ptr_mode instead
of Pmode for vtable adjustment.

Modified:
branches/x32/gcc/ChangeLog.x32
branches/x32/gcc/config/i386/i386.c


[Bug target/48529] [x32] Testsuite failures

2011-05-20 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48529

--- Comment #3 from H.J. Lu  2011-05-20 12:53:40 
UTC ---
As of revision 173943, the x32 failures are

FAIL: 27_io/basic_filebuf/close/char/4879.cc execution test
FAIL: 27_io/basic_filebuf/close/char/9964.cc execution test
FAIL: 27_io/basic_filebuf/imbue/char/13171-2.cc execution test
FAIL: 27_io/basic_filebuf/imbue/wchar_t/14975-2.cc execution test
FAIL: 27_io/basic_filebuf/seekoff/char/26777.cc execution test
FAIL: 27_io/basic_filebuf/underflow/char/10097.cc execution test
FAIL: 27_io/objects/char/7.cc execution test
FAIL: 27_io/objects/char/9661-1.cc execution test
FAIL: 27_io/objects/wchar_t/7.cc execution test
FAIL: 27_io/objects/wchar_t/9661-1.cc execution test
FAIL: gcc.c-torture/execute/builtins/strcspn.c execution,  -O1 
FAIL: gcc.dg/20020219-1.c execution test
FAIL: gcc.target/i386/pr39543-3.c (test for excess errors)
FAIL: gcc.target/i386/pr43766.c scan-assembler-not lea[lq]?[ \t]
FAIL: libgomp.fortran/strassen.f90  -O  execution test
FAIL: libstdc++-abi/abi_check


[Bug tree-optimization/49040] ICE in translate_clast, at graphite-clast-to-gimple.c:1123

2011-05-20 Thread kilo at stierand dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49040

kiloalphaindia  changed:

   What|Removed |Added

 CC||kilo at stierand dot com

--- Comment #1 from kiloalphaindia  2011-05-20 
12:50:26 UTC ---
I can confirm this bug.

ppl 0.11.2
cloog 0.16.2
gcc version 4.6.1 20110513 (prerelease) (GCC)

same error same file/line in compiler when compling qt4
src/gui/dialogs/qcolordialog.cpp
dialogs/qcolordialog.cpp:438:13: internal compiler error: in translate_clast,
at graphite-clast-to-gimple.c:1123

If necessary I will attach the preprocessed code. (did't do it since there is
already an attachment of that kind)


[Bug java/49077] gcjwebplugin.cc doesn't compile against latest xulrunner 2.0 (firefox-3.6) sdk

2011-05-20 Thread jason.vas.dias at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49077

--- Comment #5 from Jason Vas Dias  2011-05-20 
12:56:44 UTC ---
(In reply to comment #3)
> gcjwebplugin is dead, it should have been removed, but nobody has done that.
> Just don't enable it in configure.

Well then what replaces the Firefox plugin functionality - ie.
what happens when I include '--enable-browser-plugin' in configure args ?
A JVM environment and Java SDK is hardly worthy of the name unless it
can be used to run java applets embedded in webpages from the system
browser - how else is one meant to do this using only GCJ components ?

This problem appears to be the ONLY reason gcjwebplugin fails to build ;
are you sure rumors of its demise are not premature ?


[Bug bootstrap/49078] [4.7 Regression] LTO bootstrap failed with bootstrap-profiled

2011-05-20 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49078

--- Comment #1 from H.J. Lu  2011-05-20 13:02:19 
UTC ---
It is caused by revision 173939:

http://gcc.gnu.org/ml/gcc-cvs/2011-05/msg00718.html


[Bug target/49069] ICE in gen_cstoredi4, at config/arm/arm.md:7554

2011-05-20 Thread rmansfield at qnx dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49069

--- Comment #2 from Ryan Mansfield  2011-05-20 
13:08:05 UTC ---
This ICE happens for me on the 4.6 branch.


[Bug target/49030] ICE in get_arm_condition_code, at config/arm/arm.c:17180

2011-05-20 Thread rmansfield at qnx dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49030

--- Comment #2 from Ryan Mansfield  2011-05-20 
13:04:58 UTC ---
With rev173940

$ ./cc1 -fpreprocessed ice.i -quiet -O1 
ice.i: In function 'bar':
ice.i:33:1: internal compiler error: in get_arm_condition_code, at
config/arm/arm.c:17021
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


[Bug tree-optimization/49079] [4.6/4.7 Regression] Bogus constant folding

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49079

--- Comment #2 from Richard Guenther  2011-05-20 
13:05:23 UTC ---
We call ustr_cmp_fast_buf with
  s1, $3 = 0x6101b0 "\245\001\002s2", 1
when compiled with -O1 instead of with
  s1, $1 = 0x40ac06 "s2", 2
when compiled with -O0.


[Bug target/49049] ICE in copyprop_hardreg_forward_1, at regcprop.c:767

2011-05-20 Thread rmansfield at qnx dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49049

--- Comment #2 from Ryan Mansfield  2011-05-20 
13:07:17 UTC ---
With rev173940 I can reproduce it with -marm.

$ ./cc1 -quiet -fpreprocessed ice.i -O3 -marm 
ice.i: In function 'foo':
ice.i:28:1: error: insn does not satisfy its constraints:
(insn 98 35 37 3 (set (reg:SI 4 r4 [195])
(minus:SI (const_int 4 [0x4])
(const_int 861 [0x35d]))) ice.i:6 29 {*arm_subsi3_insn}
 (nil))
ice.i:28:1: internal compiler error: in copyprop_hardreg_forward_1, at
regcprop.c:767
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


[Bug java/49077] gcjwebplugin.cc doesn't compile against latest xulrunner 2.0 (firefox-3.6) sdk

2011-05-20 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49077

--- Comment #6 from Jakub Jelinek  2011-05-20 
13:15:15 UTC ---
(In reply to comment #5)
> (In reply to comment #3)
> > gcjwebplugin is dead, it should have been removed, but nobody has done that.
> > Just don't enable it in configure.
> 
> Well then what replaces the Firefox plugin functionality - ie.
> what happens when I include '--enable-browser-plugin' in configure args ?
> A JVM environment and Java SDK is hardly worthy of the name unless it
> can be used to run java applets embedded in webpages from the system
> browser - how else is one meant to do this using only GCJ components ?
> 
> This problem appears to be the ONLY reason gcjwebplugin fails to build ;
> are you sure rumors of its demise are not premature ?

It is what the gcjwebplugin authors told me when I reported it to them many
months ago.  The plugin is maintained as part of icedtea for openjdk, and
that's where development and maintainance occurs.


[Bug tree-optimization/49079] [4.6/4.7 Regression] Bogus constant folding

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49079

--- Comment #3 from Richard Guenther  2011-05-20 
13:21:23 UTC ---
I think it goes wrong when folding during inlining of ustr_len.

  D.2729_11 = xi1_6 + 1;
  switch (xi2_9) , case 0: , case 1: , case 2: , case
4: , case 8: >
...
:
  D.2772_47 = MEM[(const unsigned char *)s1_1(D)].data[D.2729_11]{lb: 0 sz: 1};

at runtime xi1_6 is zero.  After inlining we get

  D.2830_13 = xi1_9 + 1;
  switch (xi2_12) , case 0: , case 1: , case 2: ,
case 4: , case 8: >
...
  # ret_45 = PHI <0(2), ret_42(5)>
:
  D.2828_43 = 1;

but we are called with s1_1 = "\1\2s2" so somehow the offset from the array
ref around the MEM is ignored.


[Bug tree-optimization/49064] [x86/x64]: broken alias analysis leads vectorizer to emit poor code

2011-05-20 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49064

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek  2011-05-20 
13:24:38 UTC ---
The code has to reread this->m_Data, v1.m_Data and v2.m_Data in every loop,
because writes through __m128i * could very well clobber X, points-to in this
case can't figure out anything, only TBAA would, but the __m{64,128}* types as
designed can alias anything.  It would really surprise me if Intel's __m128i
can alias ints, longs and many other things, but can't alias X in this case.


[Bug tree-optimization/49079] [4.6/4.7 Regression] Bogus constant folding

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49079

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.05.20 13:28:05
 Ever Confirmed|0   |1

--- Comment #4 from Richard Guenther  2011-05-20 
13:28:05 UTC ---
Because the array length is of size 1 and get_ref_base_and_extent returns an
exact match in that case.  We have to account for trailing flexible arrays.

Testcase:

extern void abort (void);

struct Ustr
{
  unsigned char data[1];
};

static unsigned int
ustr_xi__embed_val_get(const unsigned char *data)
{
  return (unsigned int)data[0];
}

int __attribute__((noinline)) zero(void) { return 0; }

static unsigned int
ustr_len(const struct Ustr *s1)
{
  return ustr_xi__embed_val_get(s1->data + 1 + zero());
}

int
main()
{
  if (ustr_len (((struct Ustr *) "\x01" "\x0002" "s2")) != 2)
abort ();

  return 0;
}


[Bug libfortran/48982] libgfortran on sysv never uses fpsetmask

2011-05-20 Thread jb at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48982

Janne Blomqvist  changed:

   What|Removed |Added

 CC||jb at gcc dot gnu.org

--- Comment #2 from Janne Blomqvist  2011-05-20 13:32:21 
UTC ---
Are you sure you need the 

#include 

in fpu-sysv.h? It should be included already in libgfortran.h, which is
included in runtime/fpu.c before fpu-target.h.


[Bug java/49077] gcjwebplugin.cc doesn't compile against latest xulrunner 2.0 (firefox-3.6) sdk

2011-05-20 Thread gnu_andrew at member dot fsf.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49077

Andrew John Hughes  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||gnu_andrew at member dot
   ||fsf.org
 Resolution||WONTFIX

--- Comment #7 from Andrew John Hughes  
2011-05-20 13:34:43 UTC ---
gcjwebplugin in gcj/Classpath is dead.  I actually suggested it be removed some
time ago, but there was resistance to doing so.  Current development on a Free
Software browser plugin takes place in the IcedTea-Web project, but this
currently supports only IcedTea as the JDK.  I'd like to see it eventually
support gcj too, but it would need work on both sides for this to happen.

As to your comment about a JDK being irrelevant without applet support, I think
most enterprise JDK users would take issue with this; there is plenty of use
for a JDK besides running applets.  OpenJDK itself (as provided by Oracle)
doesn't have applet support, hence the need for the IcedTea-Web project to
provide a Free implementation.

BTW, regarding the subject, isn't xulrunner 2.0 firefox 4.0, not 3.6?


[Bug fortran/48977] -fpe-trap=denormal on x86 GLIBC systems

2011-05-20 Thread jb at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48977

Janne Blomqvist  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2011-05/msg01447.htm
   ||l
   Last reconfirmed||2011.05.20 13:29:10
 CC||jb at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |jb at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #2 from Janne Blomqvist  2011-05-20 13:29:10 
UTC ---
Patch: http://gcc.gnu.org/ml/gcc-patches/2011-05/msg01447.html


[Bug target/49030] ICE in get_arm_condition_code, at config/arm/arm.c:17180

2011-05-20 Thread ibolton at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49030

Ian Bolton  changed:

   What|Removed |Added

 Status|WAITING |NEW
  Known to fail||4.7.0

--- Comment #3 from Ian Bolton  2011-05-20 13:46:00 
UTC ---
I was hoping the compiler command would tell me what -mcpu it was defaulting
to.

Anyway, I have managed to reproduce it now, by compiling as follows:

  cc1 -fpreprocessed 49030.i -quiet -O1 -o 49030.s -mcpu=arm7tdmi -marm

Note that it all works with -mthumb and/or -mcpu=cortex-a9.

I have tried this with my old toolchain and it is broken as far back as
r164700.


[Bug libfortran/48982] libgfortran on sysv never uses fpsetmask

2011-05-20 Thread jb at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48982

--- Comment #3 from Janne Blomqvist  2011-05-20 13:40:47 
UTC ---
Actually, in the version control log for acinclude.m4 we have

commit b00fa2cfbfd81cbdc31d5a44e4ce8140cc153776
Author: fxcoudert 
Date:   Fri Feb 25 17:56:04 2011 +

* acinclude.m4 (LIBGFOR_CHECK_FPSETMASK): Set shell variable
tested in configure.host.
* configure: Regenerate.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170500
138bc75d-0d04-0410-961f-82ee72b054a4

And indeed the test is now

dnl Checks for fpsetmask function.
AC_DEFUN([LIBGFOR_CHECK_FPSETMASK], [
  AC_CACHE_CHECK([whether fpsetmask is present], libgfor_cv_have_fpsetmask, [
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#if HAVE_FLOATINGPOINT_H
# include 
#endif /* HAVE_FLOATINGPOINT_H */
#if HAVE_IEEEFP_H
# include 
#endif /* HAVE_IEEEFP_H */]],[[fpsetmask(0);]])],
eval "libgfor_cv_have_fpsetmask=yes", eval "libgfor_cv_have_fpsetmask=no")
  ])
  if test x"$libgfor_cv_have_fpsetmask" = xyes; then
have_fpsetmask=yes
AC_DEFINE(HAVE_FPSETMASK, 1, [Define if you have fpsetmask.])
  fi
])


Can you test whether this works on 4.6?


[Bug bootstrap/49072] Error building the compiler

2011-05-20 Thread jose.pascual-guti...@1-act.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49072

--- Comment #2 from Jose  2011-05-20 13:47:38 
UTC ---
Thank you very much, Jonathan, for your comments.

I tried as you suggested. Instead of using mpfr-2.4.2, I downloaded the latest
version, namely, mpfr-3.0.1. I also tried with mpc-0.8.1 and mpc-0.9. The same
file tree structure and directory names were maintained as in my original
message. Also, I simply did a "make" and not a "make bootstrap". The building
failed in all cases:

make [5]: *** [acos.lo] Error 1
make [5]: Leavimng directory
'/home/Jose.Pascual-Gutierr/gcc_compileres/objdir/mpc/src'
Making all in tests
make [5]: Entering directory
''/home/Jose.Pascual-Gutierr/gcc_compileres/objdir/mpc/tests'
make [5]: Nothing to be done for 'all'.
make [5]: Leavimng directory
'/home/Jose.Pascual-Gutierr/gcc_compileres/objdir/mpc/tests'
Making all in doc
make [5]: Entering directory
''/home/Jose.Pascual-Gutierr/gcc_compileres/objdir/mpc/doc'
make [5]: Nothing to be done for 'all'.
make [5]: Leaving directory
''/home/Jose.Pascual-Gutierr/gcc_compileres/objdir/mpc/doc'
make [5]: Entering directory
''/home/Jose.Pascual-Gutierr/gcc_compileres/objdir/mpc'
make [5]: Leaving directory
''/home/Jose.Pascual-Gutierr/gcc_compileres/objdir/mpc'
make [4]: *** [all-recursive] Error 1
make [4]: Leaving directory
''/home/Jose.Pascual-Gutierr/gcc_compileres/objdir/mpc'
make [3]: *** [all] Error 2
make [3]: Leaving directory
''/home/Jose.Pascual-Gutierr/gcc_compileres/objdir/mpc'
make [2]: *** [all-stage1-mpc] Error 2
make [2]: Leaving directory ''/home/Jose.Pascual-Gutierr/gcc_compileres/objdir'
make [1]: *** [stage1-bubble] Error 2
make [1]: Leaving directory ''/home/Jose.Pascual-Gutierr/gcc_compileres/objdir'
make: *** [all] Error 2


Thank you very much again for your further comments,
Jose


[Bug target/49049] ICE in copyprop_hardreg_forward_1, at regcprop.c:767

2011-05-20 Thread ibolton at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49049

--- Comment #3 from Ian Bolton  2011-05-20 13:50:56 
UTC ---
Thanks for confirming that.

If I try "-marm -mcpu=arm7tdmi" I can get the ICE, but not with "-marm
-mcpu=cortex-a9".


[Bug libfortran/48982] libgfortran on sysv never uses fpsetmask

2011-05-20 Thread jb at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48982

Janne Blomqvist  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2011.05.20 13:41:33
 Ever Confirmed|0   |1


[Bug c++/49021] [4.6 regression] BOOST_FOREACH over vector segfaults at runtime

2011-05-20 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49021

--- Comment #11 from Jonathan Wakely  2011-05-20 
13:44:10 UTC ---
Created attachment 24299
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24299
reduced by delta


[Bug tree-optimization/49079] [4.6/4.7 Regression] Bogus constant folding

2011-05-20 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49079

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek  2011-05-20 
13:45:32 UTC ---
Slightly deobfuscated testcase:
extern void abort (void);

struct U { unsigned char u[1]; };

static unsigned int
foo (const unsigned char *x)
{
  return (unsigned int) x[0];
}

__attribute__ ((noinline)) int
bar (void)
{
  return 0;
}

static unsigned int
baz (const struct U *x)
{
  return foo (x->u + 1 + bar ());
}

int
main ()
{
  if (baz (((struct U *) "abcd")) != 'b')
abort ();
  return 0;
}

bisecting when it started...


[Bug tree-optimization/49079] [4.6/4.7 Regression] Bogus constant folding

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49079

--- Comment #6 from Richard Guenther  2011-05-20 
14:13:27 UTC ---
I'm testing a patch already (probably caused by the mem-ref merge).


[Bug libfortran/48982] libgfortran on sysv never uses fpsetmask

2011-05-20 Thread nicolai.stange at zmaw dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48982

--- Comment #4 from Nicolai Stange  2011-05-20 
14:14:05 UTC ---
(In reply to comment #2)
> Are you sure you need the 
> 
> #include 
Definitely, i've got compile errors when it isn't there.


[Bug libfortran/48982] libgfortran on sysv never uses fpsetmask

2011-05-20 Thread nicolai.stange at zmaw dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48982

--- Comment #5 from Nicolai Stange  2011-05-20 
14:15:44 UTC ---
(In reply to comment #3)
> Can you test whether this works on 4.6?
Sure, but this might take some time.


[Bug tree-optimization/49073] [4.6/4.7 Regression] g++ optimizer breaks do-while code

2011-05-20 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49073

--- Comment #4 from Jakub Jelinek  2011-05-20 
14:19:07 UTC ---
Author: jakub
Date: Fri May 20 14:19:05 2011
New Revision: 173948

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173948
Log:
PR tree-optimization/49073
* gimple-fold.c (and_comparisons_1, or_comparisons_1): Return
NULL if PHI argument is SSA_NAME, whose def_stmt is dominated
by the PHI.
* tree-ssa-ifcombine.c (tree_ssa_ifcombine): Calculate dominators.

* gcc.c-torture/execute/pr49073.c: New test.

Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr49073.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-fold.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-ifcombine.c


[Bug tree-optimization/49079] [4.6/4.7 Regression] Bogus constant folding

2011-05-20 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49079

--- Comment #7 from Jakub Jelinek  2011-05-20 
14:29:04 UTC ---
Started in:
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164688


[Bug target/49030] ICE in get_arm_condition_code, at config/arm/arm.c:17180

2011-05-20 Thread rmansfield at qnx dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49030

--- Comment #4 from Ryan Mansfield  2011-05-20 
14:41:41 UTC ---
(In reply to comment #3)
> I was hoping the compiler command would tell me what -mcpu it was defaulting
> to.

I'm using an arm-unknown-linux-gnueabi configuration which defaults an
arm10tdmi.

linux-eabi.h:#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi


[Bug target/48529] [x32] Testsuite failures

2011-05-20 Thread hjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48529

--- Comment #4 from hjl at gcc dot gnu.org  2011-05-20 
14:34:03 UTC ---
Author: hjl
Date: Fri May 20 14:33:58 2011
New Revision: 173949

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173949
Log:
Disable gcc.dg/20020219-1.c for x32.

2011-05-20  H.J. Lu  

PR target/48529
* gcc.dg/20020219-1.c: Disabled for x32.

Modified:
branches/x32/gcc/testsuite/ChangeLog.x32
branches/x32/gcc/testsuite/gcc.dg/20020219-1.c


[Bug target/48529] [x32] Testsuite failures

2011-05-20 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48529

--- Comment #5 from H.J. Lu  2011-05-20 14:39:37 
UTC ---
As of revision 173950, the x32 failures are

FAIL: 27_io/basic_filebuf/close/char/4879.cc execution test
FAIL: 27_io/basic_filebuf/close/char/9964.cc execution test
FAIL: 27_io/basic_filebuf/imbue/char/13171-2.cc execution test
FAIL: 27_io/basic_filebuf/imbue/wchar_t/14975-2.cc execution test
FAIL: 27_io/basic_filebuf/seekoff/char/26777.cc execution test
FAIL: 27_io/basic_filebuf/underflow/char/10097.cc execution test
FAIL: 27_io/objects/char/7.cc execution test
FAIL: 27_io/objects/char/9661-1.cc execution test
FAIL: 27_io/objects/wchar_t/7.cc execution test
FAIL: 27_io/objects/wchar_t/9661-1.cc execution test
FAIL: gcc.c-torture/execute/builtins/strcspn.c execution,  -O1 
FAIL: gcc.target/i386/pr39543-3.c (test for excess errors)
FAIL: gcc.target/i386/pr43766.c scan-assembler-not lea[lq]?[ \t]
FAIL: libgomp.fortran/strassen.f90  -O  execution test


[Bug tree-optimization/49073] [4.6/4.7 Regression] g++ optimizer breaks do-while code

2011-05-20 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49073

--- Comment #5 from Jakub Jelinek  2011-05-20 
14:35:23 UTC ---
Author: jakub
Date: Fri May 20 14:35:20 2011
New Revision: 173951

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173951
Log:
PR tree-optimization/49073
* gimple-fold.c (and_comparisons_1, or_comparisons_1): Return
NULL if PHI argument is SSA_NAME, whose def_stmt is dominated
by the PHI.
* tree-ssa-ifcombine.c (tree_ssa_ifcombine): Calculate dominators.

* gcc.c-torture/execute/pr49073.c: New test.

Added:
branches/gcc-4_6-branch/gcc/testsuite/gcc.c-torture/execute/pr49073.c
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/gimple-fold.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
branches/gcc-4_6-branch/gcc/tree-ssa-ifcombine.c


[Bug tree-optimization/49073] [4.6/4.7 Regression] g++ optimizer breaks do-while code

2011-05-20 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49073

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #6 from Jakub Jelinek  2011-05-20 
14:38:58 UTC ---
Fixed.


[Bug fortran/48977] -fpe-trap=denormal on x86 GLIBC systems

2011-05-20 Thread jb at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48977

Janne Blomqvist  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Janne Blomqvist  2011-05-20 14:49:02 
UTC ---
Fixed, closing.


[Bug fortran/48977] -fpe-trap=denormal on x86 GLIBC systems

2011-05-20 Thread jb at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48977

--- Comment #3 from Janne Blomqvist  2011-05-20 14:45:53 
UTC ---
Author: jb
Date: Fri May 20 14:45:51 2011
New Revision: 173952

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173952
Log:
PR 48977 Denormal exception on glibc targets

Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/configure.host


[Bug c/49081] Incorrect counter used for compilation of string literals.

2011-05-20 Thread Roger.Jeurninck at home dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49081

--- Comment #1 from Roger Jeurninck  2011-05-20 
15:04:40 UTC ---
Created attachment 24302
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24302
commands to reproduce (first part of script)


[Bug c/49081] Incorrect counter used for compilation of string literals.

2011-05-20 Thread Roger.Jeurninck at home dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49081

--- Comment #2 from Roger Jeurninck  2011-05-20 
15:05:06 UTC ---
Created attachment 24303
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24303
patch file


[Bug rtl-optimization/49080] New: Wrong register allocation for even register

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49080

   Summary: Wrong register allocation for even register
   Product: gcc
   Version: 4.6.1
Status: UNCONFIRMED
  Keywords: ra, wrong-code
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: rgue...@gcc.gnu.org
CC: vmaka...@gcc.gnu.org, kreb...@gcc.gnu.org
Target: s390-linux


Created attachment 24300
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24300
preprocessed source

glibc _itoa is miscompiled with

> ./cc1 -quiet -fpreprocessed _itoa.i -quiet -dumpbase _itoa.c -m31 -mesa -O2 
> -std=gnu99 -fgnu89-inline -fmerge-all-constants -fno-strict-aliasing -fpic -o 
> _itoa.s -march=z10 -mzarch -mtune=z196

(reproduced on a x86_64 -> s390-linux cross)

resulting in SIGILLs because mr needs an even numbered register as first
operand.

_itoa:
.LFB5:
stm %r6,%r15,24(%r15)
.LCFI8:
...
#APP
# 434 "_itoa.c" 1
lr %r14,%r1
mr %r13,%r10
#NO_APP
nr  %r3,%r14


[Bug tree-optimization/49079] [4.6/4.7 Regression] Bogus constant folding

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49079

--- Comment #9 from Richard Guenther  2011-05-20 
15:08:59 UTC ---
Author: rguenth
Date: Fri May 20 15:08:56 2011
New Revision: 173955

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173955
Log:
2011-05-20  Richard Guenther  

PR tree-optimization/49079
* tree-dfa.c (get_ref_base_and_extent): Handle view-converting
MEM_REFs correctly for the trailing array access detection.
Special case constants the same way as decls for overall size
constraining.

* gcc.dg/torture/pr49079.c: New testcase.

Added:
branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/torture/pr49079.c
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
branches/gcc-4_6-branch/gcc/tree-dfa.c


[Bug c/49081] Incorrect counter used for compilation of string literals.

2011-05-20 Thread Roger.Jeurninck at home dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49081

--- Comment #3 from Roger Jeurninck  2011-05-20 
15:05:37 UTC ---
Created attachment 24304
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24304
patched file


[Bug tree-optimization/49079] [4.6/4.7 Regression] Bogus constant folding

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49079

Richard Guenther  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Known to work||4.5.3, 4.6.1
 Resolution||FIXED
  Known to fail||4.6.0

--- Comment #10 from Richard Guenther  2011-05-20 
15:11:35 UTC ---
Fixed.


[Bug tree-optimization/49079] [4.6/4.7 Regression] Bogus constant folding

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49079

--- Comment #8 from Richard Guenther  2011-05-20 
15:02:51 UTC ---
Author: rguenth
Date: Fri May 20 15:02:49 2011
New Revision: 173954

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173954
Log:
2011-05-20  Richard Guenther  

PR tree-optimization/49079
* tree-dfa.c (get_ref_base_and_extent): Handle view-converting
MEM_REFs correctly for the trailing array access detection.
Special case constants the same way as decls for overall size
constraining.

* gcc.dg/torture/pr49079.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr49079.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-dfa.c


[Bug middle-end/48849] [4.7 Regression] SPEC CPU 2000/2006 failed to build with LTO

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48849

Richard Guenther  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Depends on||49078
 Resolution||FIXED

--- Comment #8 from Richard Guenther  2011-05-20 
15:12:18 UTC ---
Fixed but caused PR49078.


[Bug c++/49082] New: [C++0x] Issues with noexcept propagation

2011-05-20 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49082

   Summary: [C++0x] Issues with noexcept propagation
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: paolo.carl...@oracle.com


This is a memo for the issues with noexcept already signaled to Jason. First I
noticed this, which seriously blocks library work at the moment:

#include 

struct Base
{
  Base(const Base&) noexcept(false);
  Base(Base&&) noexcept(false);
};

struct Derived
: Base
{
  // Derived(const Derived&) = default;
  // Derived(Derived&&) = default;
};

static_assert(!noexcept(Base(std::declval())), "Error");
static_assert(!noexcept(Derived(std::declval())), "Error"); //
Error

static_assert(!noexcept(Base(std::declval())), "Error");
static_assert(!noexcept(Derived(std::declval())), "Error"); // Error

Then Daniel Krugler added this:

struct Base
{
 Base(const Base&) noexcept(false);
 Base(Base&&) noexcept(false);
 ~Base() noexcept(false);
};

struct Derived
: Base
{
  Base b;
};

static_assert(!noexcept(std::declval().~Base()), "Error"); // OK
static_assert(!noexcept(std::declval().~Derived()), "Error"); //
Error


[Bug bootstrap/49078] [4.7 Regression] LTO bootstrap failed with bootstrap-profiled

2011-05-20 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49078

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011.05.20 15:13:37
 AssignedTo|unassigned at gcc dot   |rguenth at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #2 from Richard Guenther  2011-05-20 
15:13:37 UTC ---
I can reproduce it.


[Bug lto/45375] [meta-bug] Issues with building Mozilla with LTO

2011-05-20 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375

--- Comment #94 from Jan Hubicka  2011-05-20 
15:30:38 UTC ---
Callgrinding htab_find_slot_with_hash leads to:

 2,535,276,742  < /libiberty/hashtab.c:htab_find_slot'2 (27545437x) [//lto1]
84,947,655,239  < /libiberty/hashtab.c:htab_find_slot (52919141x) [//lto1]
 7,097,218,396  *  /libiberty/hashtab.c:htab_find_slot_with_hash [//lto1]

   172,769,366  < /gcc/gimple.c:iterative_hash_gimple_type'2 (1062343x)
[//lto1]
   172,240,553  < /gcc/gimple.c:iterative_hash_canonical_type'2 (1385651x)
[//lto1]
   577,192,890  < /gcc/gimple.c:iterative_hash_gimple_type (3503598x) [//lto1]
   272,475,796  < /gcc/gimple.c:visit'2 (2487924x) [//lto1]
 5,719,882,429  < /gcc/gimple.c:gimple_type_hash (54720792x) [//lto1]
   220,431,173  < /gcc/gimple.c:iterative_hash_canonical_type (1878732x)
[//lto1]
 1,049,746,336  < /gcc/gimple.c:visit (10902158x) [//lto1]
 1,366,941,564  *  /libiberty/hashtab.c:htab_find_slot'2 [//lto1]


 1,663,235,593  < /gcc/gimple.c:gimple_register_canonical_type (1841890x)
[//lto1]
 9,524,617,674  < /gcc/lto-streamer-in.c:lto_input_location (11940149x)
[//lto1]

88,359,773,304  < /gcc/gimple.c:gimple_register_type_1 (6184225x) [//lto1]
   919,314,384  < /gcc/tree.c:build_int_cst_wide (2665535x) [//lto1]
   337,283,088  < /gcc/cgraph.c:cgraph_get_node_or_alias (2410404x) [//lto1]
 1,856,067,526  < /gcc/lto/lto.c:remember_with_vars (10704387x) [//lto1]
   265,696,672  < /gcc/lto-symtab.c:lto_symtab_register_decl (2471602x)
[//lto1]
 1,020,331,990  < /gcc/lto-symtab.c:lto_symtab_get (10402341x) [//lto1]
   952,544,538  *  /libiberty/hashtab.c:htab_find_slot [//lto1]

So gimple_type_hash (54 million), input_locaiton and remember_with_vars (with
about 10 million) seems to be major (ab)users of hashing now.

For malloc abuse, the major source is pointer_map_create (66 million calls),
and vec_heap_o_reserve_1 (23 million) and obstack_begin (22 million) that leads
to...


30,424,353,893  < /gcc/gimple.c:gimple_type_eq (18852945x) [//lto1]
 5,578,574,652  < /gcc/gimple.c:gimple_type_hash (3452343x) [//lto1]
   401,735,124  *  /gcc/pointer-set.c:pointer_map_create [//lto1]


[Bug lto/45375] [meta-bug] Issues with building Mozilla with LTO

2011-05-20 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375

--- Comment #95 from Jan Hubicka  2011-05-20 
15:31:28 UTC ---
... and
 7,456,601,134  < /gcc/gimple.c:gimple_type_eq (18852945x) [//lto1]
 1,384,102,312  < /gcc/gimple.c:gimple_type_hash (3452343x) [//lto1]
   936,822,402  *  ???:_obstack_begin [/lib64/libc-2.11.1.so]


[Bug c/49081] New: Incorrect counter used for compilation of string literals.

2011-05-20 Thread Roger.Jeurninck at home dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49081

   Summary: Incorrect counter used for compilation of string
literals.
   Product: gcc
   Version: 4.4.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: roger.jeurni...@home.nl


Created attachment 24301
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24301
reproduction file


Bug found on Solaris 10 / gcc 4.4.2
Reproduceable on Ubuntu 10.04 / gcc 4.4.3


Description

Incorrect counter used for compilation of string literals. 
(see attached example, and reproduction scenario)
By adding some dummy variables the static local string literals will get a
different symbol name which results in a binary different output file.
We have analysed that this can be solved by introducing a 'static' counter, see
attached solution.

Please let me know if you need more comments on the attached files.
thanks,
Roger


[Bug c++/36883] Overeager ADL again

2011-05-20 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36883

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE

--- Comment #3 from Jason Merrill  2011-05-20 
15:56:21 UTC ---
This is another instance of 29131.

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


[Bug rtl-optimization/49080] Wrong register allocation for even register

2011-05-20 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49080

--- Comment #1 from Andreas Schwab  2011-05-20 16:01:04 
UTC ---
FWIW, the copy of longlong.h in glibc is slightly out of date, it lacks support
for zarch, which uses a different definition of smul_ppmm.


[Bug c/49081] Incorrect counter used for compilation of string literals.

2011-05-20 Thread joseph at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49081

--- Comment #4 from joseph at codesourcery dot com  2011-05-20 16:03:50 UTC ---
I don't see any explanation of what you think the compiler is doing wrong.  
For example, "when this source file is compiled with the following 
options, the program exits with status N, but it should exit with status M 
instead".  What behavior exactly do you expect, and what is the specific 
difference between what you expect and what you get?  "Incorrect counter" 
is not a meaningful explanation for what is wrong with the compiler's 
behavior.


[Bug c++/49083] New: g++ should error when a variable declared in a condition is hidden by a variable in the immediately contained block

2011-05-20 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49083

   Summary: g++ should error when a variable declared in a
condition is hidden by a variable in the immediately
contained block
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: howa...@nitro.med.uc.edu


Created attachment 24305
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24305
test case demonstrating the missing error message

Currently g+= 4.6.0 doesn't produce an error for the attached test case,
derived from apt-0.5.4/apt-pkg/deb/deblistparser.cc, despite the fact that a
c++ compiler should error when a variable is declared in a condition that is
hidden by a variable in the immediately contained block. The attached test case
causes the expected compiler errors on HP aCC, AIX xlC, Tru64 cxx and Irix CC.
The g++ compiler only produces a warning if -Wshadow is used. Note that clang
produces the error...

hidden_bug.cc:14:8: error: redefinition of 'I' with a different type
char *I = S;
  ^
hidden_bug.cc:10:25: note: previous definition is here
  for (const char **I = Sections; *I != 0; I++)
^
hidden_bug.cc:18:21: error: assigning to 'const char *' from incompatible type
'char'
   *I++ = tolower(*Start);
^ ~~~
hidden_bug.cc:20:22: error: assigning to 'const char *' from incompatible type
'char'
*I++ = '=';
 ^ ~~~
hidden_bug.cc:22:22: error: assigning to 'const char *' from incompatible type
'char'
*I++ = '=';
 ^ ~~~
4 errors generated.


[Bug c++/29131] [DR 225] Bad name lookup for templates due to fundamental types namespace for ADL.

2011-05-20 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29131

Jason Merrill  changed:

   What|Removed |Added

 Status|SUSPENDED   |ASSIGNED
 CC||jason at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |


[Bug ada/49084] New: Bootstrap failure with bug box of Program_Error EXCEPTION_ACCESS _VIOLATION / Error detected at system.ads:175:5

2011-05-20 Thread anhvofrcaus at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49084

   Summary: Bootstrap failure with bug box of Program_Error
EXCEPTION_ACCESS _VIOLATION / Error detected at
system.ads:175:5
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: anhvofrc...@gmail.com


Snapshot gcc-4.7-20110514 fails bootstrap in stage 3 with bug box indicating
error detected at system.ads:175:5. This build was configured as
../gcc-4.7-20110514/configure --without-build-config --disable-werror
--enable-languages=ada,c. The trailing error message is shown below.

/c/Gcc/Build-4.7.x/./prev-gcc/xgcc -B/c/Gcc/Build-4.7.x/./prev-gcc/
-B/usr/local/i686-pc-mingw32/bin/
-L/c/Gcc/Build-4.7.x/i686-pc-mingw32/winsup/mingw
-L/c/Gcc/Build-4.7.x/i686-pc-mingw32/winsup/w32api/lib -isystem
/c/Gcc/gcc-4.7-20110514/winsup/mingw/include -isystem
/c/Gcc/gcc-4.7-20110514/winsup/w32api/include -B/usr/local/i686-pc-mingw32/bin/
-B/usr/local/i686-pc-mingw32/lib/ -isystem /usr/local/i686-pc-mingw32/include
-isystem /usr/local/i686-pc-mingw32/sys-include-c -g -O2
-D__USE_MINGW_ACCESS -Wno-pedantic-ms-format  -gnatpg -gnata -nostdinc -I- -I.
-Iada -I../../gcc-4.7-20110514/gcc/ada
-I../../gcc-4.7-20110514/gcc/ada/gcc-interface
../../gcc-4.7-20110514/gcc/ada/a-charac.ads -o ada/a-charac.o
gnat1.exe: warning: command line option '-Wno-pedantic-ms-format' is valid for
C
/C++/ObjC/ObjC++ but not for Ada [enabled by default]
+===GNAT BUG DETECTED==+
| 4.7.0 20110514 (experimental) (i686-pc-mingw32) Program_Error
EXCEPTION_ACCESS
_VIOLATION|
| Error detected at system.ads:175:5   |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.|
| Use a subject line meaningful to you and us to track the bug.|
| Include the entire contents of this bug box in the report.   |
| Include the exact gcc or gnatmake command that you entered.  |
| Also include sources listed below in gnatchop format |
| (concatenated together with no headers between files).   |
+==+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.
Consider also -gnatd.n switch (see debug.adb).

../../gcc-4.7-20110514/gcc/ada\system.ads
../../gcc-4.7-20110514/gcc/ada/a-charac.ads
../../gcc-4.7-20110514/gcc/ada\ada.ads

compilation abandoned
make[3]: *** [ada/a-charac.o] Error 1
make[3]: Leaving directory `/c/Gcc/Build-4.7.x/gcc'
make[2]: *** [all-stage3-gcc] Error 2
make[2]: Leaving directory `/c/Gcc/Build-4.7.x'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/c/Gcc/Build-4.7.x'
make: *** [all] Error 2


[Bug libstdc++/41495] libstdc++ --enable-clocale=ieee_1003.1-2001 fails

2011-05-20 Thread alasdairrr at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41495

Alasdair Lumsden  changed:

   What|Removed |Added

 CC||alasdairrr at gmail dot com

--- Comment #6 from Alasdair Lumsden  2011-05-20 
16:19:04 UTC ---
Hi There,

I'm project lead for OpenIndiana, the community continuation of OpenSolaris.

We currently build the whole OS using Sun Studio, which is closed source. We
are seriously investigating switching from Sun Studio, to GCC, in particular
4.5.3. However the lack of ieee 1003.1-2001 support is holding us back
committing to this.

Would the author of the patch be able to comment on the stability and
completeness of it? What work is outstanding? What would it take to complete
this work, and would the author of the patch be interested in completing this?
If so, is there anything our project could do to assist?

We can provide Solaris Zones (Both Solaris 10 and OpenIndiana ones) for
development on powerful Dual-Quad Core servers if this would be of benefit.

Many thanks!

Kind Regards,

Alasdair


[Bug c++/29131] [DR 225] Bad name lookup for templates due to fundamental types namespace for ADL.

2011-05-20 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29131

Jason Merrill  changed:

   What|Removed |Added

 CC||d...@boost-consulting.com

--- Comment #16 from Jason Merrill  2011-05-20 
15:56:21 UTC ---
*** Bug 36883 has been marked as a duplicate of this bug. ***


[Bug c++/49085] New: Crash with SIGSEGV during compilation.

2011-05-20 Thread kruizinfo at mail dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49085

   Summary: Crash with SIGSEGV during compilation.
   Product: gcc
   Version: 4.4.3
Status: UNCONFIRMED
  Severity: critical
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: kruizi...@mail.ru


[kostik@server ~/tmp/exp]$ cat main.cpp 
template  class A;
template <> class A { };

template
class B {
long unsigned C;

typedef A<__builtin_offsetof(B, C) == 0> D;
};

int main() {
B<0> e;
}
[kostik@server ~/tmp/exp]$ gcc44 -v -save-temps main.cpp
Using built-in specs.
Target: x86_64-portbld-freebsd7.2
Configured with: ./../gcc-4.4-20100112/configure --disable-nls
--with-system-zlib --with-libiconv-prefix=/usr/local --with-gmp=/usr/local
--program-suffix=44 --libdir=/usr/local/lib/gcc44
--libexecdir=/usr/local/libexec/gcc44
--with-gxx-include-dir=/usr/local/lib/gcc44/include/c++/ --disable-libgcj
--prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/gcc44
--build=x86_64-portbld-freebsd7.2
Thread model: posix
gcc version 4.4.3 20100112 (prerelease) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-mtune=generic'
 /usr/local/libexec/gcc44/gcc/x86_64-portbld-freebsd7.2/4.4.3/cc1plus -E -quiet
-v main.cpp -mtune=generic -fpch-preprocess -o main.ii
ignoring nonexistent directory
"/usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd7.2/4.4.3/../../../../../x86_64-portbld-freebsd7.2/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/lib/gcc44/include/c++/
 /usr/local/lib/gcc44/include/c++//x86_64-portbld-freebsd7.2
 /usr/local/lib/gcc44/include/c++//backward
 /usr/local/include
 /usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd7.2/4.4.3/include
 /usr/local/lib/gcc44/gcc/x86_64-portbld-freebsd7.2/4.4.3/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-mtune=generic'
 /usr/local/libexec/gcc44/gcc/x86_64-portbld-freebsd7.2/4.4.3/cc1plus
-fpreprocessed main.ii -quiet -dumpbase main.cpp -mtune=generic -auxbase main
-version -o main.s
GNU C++ (GCC) version 4.4.3 20100112 (prerelease) (x86_64-portbld-freebsd7.2)
compiled by GNU C version 4.4.3 20100112 (prerelease), GMP version
4.3.2, MPFR version 2.4.2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=30720
Compiler executable checksum: 216f0d8dc8a20a6d63819a57c5a389f3
main.cpp: In instantiation of 'B<0>':
main.cpp:12:   instantiated from here
main.cpp:8: internal compiler error: Segmentation fault: 11
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
[kostik@server ~/tmp/exp]$


[Bug bootstrap/49086] New: [4.7 Regression] libgomp/task.c:79:1: internal compiler error: Segmentation fault

2011-05-20 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49086

   Summary: [4.7 Regression] libgomp/task.c:79:1: internal
compiler error: Segmentation fault
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: domi...@lps.ens.fr


Created attachment 24306
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24306
Preprocessed file task.i

On x86_64-apple-darwin10 at revision 173960, bootstrap fails with the following
ICE:

[macbook] x86_64-apple-darwin10.7.0/libgomp% /opt/gcc/build_w/./gcc/xgcc
-B/opt/gcc/build_w/./gcc/ -B/opt/gcc/gcc4.7w/x86_64-apple-darwin10.7.0/bin/
-B/opt/gcc/gcc4.7w/x86_64-apple-darwin10.7.0/lib/ -DHAVE_CONFIG_H -I.
-I../../../work/libgomp -I../../../work/libgomp/config/bsd
-I../../../work/libgomp/config/posix -I../../../work/libgomp -Wall -pthread
-Werror -g -O2 -MT single.lo -MD -MP -MF .deps/single.Tpo -c
../../../work/libgomp/task.c
../../../work/libgomp/task.c: In function 'GOMP_task':
../../../work/libgomp/task.c:79:1: internal compiler error: Segmentation fault


[Bug bootstrap/49086] [4.7 Regression] libgomp/task.c:79:1: internal compiler error: Segmentation fault

2011-05-20 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49086

--- Comment #1 from Dominique d'Humieres  2011-05-20 
16:49:58 UTC ---
Backtrace

(gdb) run -DHAVE_CONFIG_H -I. -I../../../work/libgomp
-I../../../work/libgomp/config/bsd -I../../../work/libgomp/config/posix
-I../../../work/libgomp -Wall -Werror -g -O2 -MT single.lo -MD -MP -MF
.deps/single.Tpo ../../../work/libgomp/task.cStarting program:
/opt/gcc/build_w/gcc/cc1 -DHAVE_CONFIG_H -I. -I../../../work/libgomp
-I../../../work/libgomp/config/bsd -I../../../work/libgomp/config/posix
-I../../../work/libgomp -Wall -Werror -g -O2 -MT single.lo -MD -MP -MF
.deps/single.Tpo ../../../work/libgomp/task.c
 _OSSwapInt16 _OSSwapInt32 _OSSwapInt64 __darwin_fd_isset gomp_mutex_init
gomp_mutex_lock gomp_mutex_unlock gomp_mutex_destroy gomp_barrier_wait_start
gomp_barrier_last_thread gomp_barrier_wait_last
gomp_team_barrier_set_task_pending gomp_team_barrier_clear_task_pending
gomp_team_barrier_set_waiting_for_tasks gomp_team_barrier_waiting_for_tasks
gomp_team_barrier_done gomp_ptrlock_init gomp_ptrlock_get gomp_ptrlock_set
gomp_ptrlock_destroy gomp_thread gomp_icv gomp_finish_task
gomp_work_share_init_done __inline_memcpy_chk __inline_memmove_chk
__inline_memset_chk __inline_strcpy_chk __inline_stpcpy_chk
__inline_strncpy_chk __inline_strcat_chk __inline_strncat_chk gomp_init_task
gomp_end_task gomp_clear_parent GOMP_task gomp_barrier_handle_tasks
GOMP_taskwait
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data>
Assembling functions:
 gomp_init_task gomp_end_task GOMP_task
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0020
0x000100591de0 in dominated_by_p (dir=CDI_DOMINATORS, bb1=0x0,
bb2=0x101357a90) at ../../work/gcc/dominance.c:972
972  struct et_node *n1 = bb1->dom[dir_index], *n2 = bb2->dom[dir_index];
(gdb) bt
#0  0x000100591de0 in dominated_by_p (dir=CDI_DOMINATORS, bb1=0x0,
bb2=0x101357a90) at ../../work/gcc/dominance.c:972
#1  0x0001007a7d8d in or_comparisons_1 (code1=EQ_EXPR, op1a=0x101386cd0,
op1b=0x14300fe40, code2=EQ_EXPR, op2a=0x101386d70, op2b=0x10127aca0) at
../../work/gcc/gimple-fold.c:2747
#2  0x0001007a7ee0 in maybe_fold_or_comparisons (code1=EQ_EXPR,
op1a=0x101386d70, op1b=0x10127aca0, code2=EQ_EXPR, op2a=0x101386cd0,
op2b=0x14300fe40) at ../../work/gcc/gimple-fold.c:2790
#3  0x000100c30753 in ifcombine_iforif (inner_cond_bb=0x101357bc8,
outer_cond_bb=0x101357a90) at ../../work/gcc/tree-ssa-ifcombine.c:521
#4  0x000100c3094f in tree_ssa_ifcombine_bb (inner_cond_bb=0x101357bc8) at
../../work/gcc/tree-ssa-ifcombine.c:611
#5  0x000100c30a9a in tree_ssa_ifcombine () at
../../work/gcc/tree-ssa-ifcombine.c:637
#6  0x000100995f58 in execute_one_pass (pass=0x1011fd9a0) at
../../work/gcc/passes.c:1556
#7  0x0001009963dc in execute_pass_list (pass=0x1011fd9a0) at
../../work/gcc/passes.c:1610
#8  0x0001009963fa in execute_pass_list (pass=0x1011fd160) at
../../work/gcc/passes.c:1611
#9  0x000100b83eb6 in tree_rest_of_compilation (fndecl=0x1431f0400) at
../../work/gcc/tree-optimize.c:417
#10 0x0001004ff93e in cgraph_expand_function (node=0x1012c3250) at
../../work/gcc/cgraphunit.c:1630
#11 0x0001004ffb0a in cgraph_expand_all_functions () at
../../work/gcc/cgraphunit.c:1689
#12 0x000100500273 in cgraph_optimize () at
../../work/gcc/cgraphunit.c:1952
#13 0x0001004fcc80 in cgraph_finalize_compilation_unit () at
../../work/gcc/cgraphunit.c:1126
#14 0x0001000374c2 in c_write_global_declarations () at
../../work/gcc/c-decl.c:9840
#15 0x000100ab3600 in compile_file () at ../../work/gcc/toplev.c:586
#16 0x000100ab61a6 in do_compile () at ../../work/gcc/toplev.c:1905
#17 0x000100ab6321 in toplev_main (argc=18, argv=0x7fff5fbfd830) at
../../work/gcc/toplev.c:1977
#18 0x00010013c829 in main (argc=18, argv=0x7fff5fbfd830) at
../../work/gcc/main.c:36


[Bug middle-end/49087] New: crash in vect_is_slp_reduction

2011-05-20 Thread rmansfield at qnx dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49087

   Summary: crash in vect_is_slp_reduction
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: rmansfi...@qnx.com
  Host: x86_64-linux-gnu
Target: mips-unknown-linux-uclibc
 Build: x86_64-linux-gnu


$ cat ~/ice.i
static char func1(int si1, int si2) { }
static char func2() { }

struct S0
{
 int t;
};

int g;

struct S0 s0;

int 
foo (int arg)
{
  int *ptr = &g;
  int i, j;
  for (i = 0; i < 10; i += 1)
{
  for (j = 0; j < 1; j += 1)
{
  int k;
  if (arg)
{
  int l;
  for (k = 1; arg < 10; arg = func2 ())
{
  return l;
}
}
  *ptr = func1 ((func2 () && s0.t > *ptr), func2 ()) ^ s0.t;
}
}
}


$ ./xgcc -v
Using built-in specs.
COLLECT_GCC=./xgcc
Target: mips-unknown-linux-uclibc
Configured with: ../configure --target=mips-unknown-linux-uclibc
--prefix=/home/ryan/x-tools/mips-unknown-linux-uclibc
--with-sysroot=/home/ryan/x-tools/mips-unknown-linux-uclibc/mips-unknown-linux-uclibc/sys-root
--enable-languages=c++,lto --disable-multilib --with-float=soft
--enable-__cxa_atexit
--with-local-prefix=/home/ryan/x-tools/mips-unknown-linux-uclibc/mips-unknown-linux-uclibc/sys-root
--disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99
--enable-long-long --enable-target-optspace
Thread model: posix
$ ./xgcc -B. ~/ice.i -O3
/home/ryan/ice.i: In function 'foo':
/home/ryan/ice.i:14:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


Program received signal SIGSEGV, Segmentation fault.
0x00980f22 in gimple_code (g=0x0) at ../../gcc/gimple.h:1098
1098  return g->gsbase.code;
(gdb) bt
#0  0x00980f22 in gimple_code (g=0x0) at ../../gcc/gimple.h:1098
#1  0x009875cc in vect_is_slp_reduction (loop_info=0x1206b50, 
phi=0x76e12500, first_stmt=0x77f995d8)
at ../../gcc/tree-vect-loop.c:1746
#2  0x00989116 in vect_is_simple_reduction_1 (loop_info=0x1206b50, 
phi=0x76e12500, check_reduction=1 '\001', 
double_reduc=0x7fffde1e "", modify=1 '\001')
at ../../gcc/tree-vect-loop.c:2203
#3  0x009891e6 in vect_force_simple_reduction (loop_info=0x1206b50, 
phi=0x76e12500, check_reduction=1 '\001', 
double_reduc=0x7fffde1e "") at ../../gcc/tree-vect-loop.c:2236
#4  0x0098493a in vect_analyze_scalar_cycles_1 (loop_vinfo=0x1206b50, 
loop=0x77ebeaa0) at ../../gcc/tree-vect-loop.c:521
#5  0x00984af3 in vect_analyze_scalar_cycles (loop_vinfo=0x1206b50)
at ../../gcc/tree-vect-loop.c:596
#6  0x00986e7a in vect_analyze_loop_2 (loop_vinfo=0x1206b50)
at ../../gcc/tree-vect-loop.c:1449
#7  0x009872b0 in vect_analyze_loop (loop=0x77ebeaa0)
at ../../gcc/tree-vect-loop.c:1601
#8  0x0099e49b in vectorize_loops () at ../../gcc/tree-vectorizer.c:199
#9  0x0076b951 in execute_one_pass (pass=0x1024640)
at ../../gcc/passes.c:1556
#10 0x0076bc05 in execute_pass_list (pass=0x1024640)
at ../../gcc/passes.c:1610
#11 0x0076bc17 in execute_pass_list (pass=0x1024460)
at ../../gcc/passes.c:1611
#12 0x0076bc17 in execute_pass_list (pass=0x1023b60)
at ../../gcc/passes.c:1611
#13 0x00879178 in tree_rest_of_compilation (fndecl=0x77f9c200)
at ../../gcc/tree-optimize.c:417
#14 0x00a2d215 in cgraph_expand_function (node=0x77f9b250)
at ../../gcc/cgraphunit.c:1630
#15 0x00a2efea in cgraph_expand_all_functions ()
at ../../gcc/cgraphunit.c:1689
#16 cgraph_optimize () at ../../gcc/cgraphunit.c:1952
#17 0x00a2f58a in cgraph_finalize_compilation_unit ()
at ../../gcc/cgraphunit.c:1126
#18 0x00485f08 in c_write_global_declarations ()
at ../../gcc/c-decl.c:9840
#19 0x0081751c in compile_file () at ../../gcc/toplev.c:586
#20 0x00819604 in do_compile () at ../../gcc/toplev.c:1905
#21 0x0081976d in toplev_main (argc=5, argv=0x7fffe158)
at ../../gcc/toplev.c:1977
#22 0x7718deff in __libc_start_main ()
   from /lib/x86_64-linux-gnu/libc.so.6
#23 0x0046a3b9 in _start ()


[Bug c++/35722] [C++0x] Variadic templates expansion into non-variadic class template

2011-05-20 Thread 3dw4rd at verizon dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35722

Ed Smith-Rowland <3dw4rd at verizon dot net> changed:

   What|Removed |Added

 CC||3dw4rd at verizon dot net

--- Comment #13 from Ed Smith-Rowland <3dw4rd at verizon dot net> 2011-05-20 
16:55:48 UTC ---
I this supposed to work too?

//  This is going to be a variadic array.
#include 
#include 

template
  struct tensor
  {
  public:
typedef std::conditional>
_Elem;
_Elem elem[Dim]; // (Dim == 0 ? 1 : Dim) like array?
  };


[Bug middle-end/49087] crash in vect_is_slp_reduction

2011-05-20 Thread rmansfield at qnx dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49087

--- Comment #1 from Ryan Mansfield  2011-05-20 
16:55:24 UTC ---
Created attachment 24307
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24307
slightly more reduced testcase

Slightly more reduced test case than original.


  1   2   >