[Bug c++/44330] New: __builtin_clz is behaving differently with different optimization levels

2010-05-30 Thread eteran at alum dot rit dot edu
I have enountered a strange difference in behavior with gcc optimizations. I am
testing this with gcc-4.5.0 on a x86_64 target. Given the following code which
defines to template functions. The goal is to have a "find_first" and
"find_last" for a bitset. It will return the size of the bitset if no bits are
set, otherwise it should return the 0 based index of the first/last set bit.
There is a generic version that loops, and a specialized version which uses
builtins to avoid loops:

#include 
#include 
#include 

namespace util {
template 
int find_last(const std::bitset &bs) {
if(bs.none()) {
return N;
}

int i = bs.size();
while(i >= 0) {
if(bs[i]) {
break;
}
--i;
}
return i;
}   

template 
int find_first(const std::bitset &bs) {
if(bs.none()) {
return N;
}

int i;
for(i = 0; i < bs.size(); ++i) {
if(bs[i]) {
break;
}   
}

return i;
}

// optimized versions for 32-bit bitsets
template <>
int find_first(const std::bitset<32> &bs) {
const int x = __builtin_ffsl(bs.to_ulong());
return x ? x - 1 : 32;
}

template <>
int find_last(const std::bitset<32> &bs) {
const int x = __builtin_clz(bs.to_ulong());
return (x != 31) ? 32 - x - 1 : 32;
}
}

int main() {
std::bitset<32> bs(0);
std::cout << util::find_last(bs) << std::endl;
std::cout << util::find_first(bs) << std::endl;
std::cout << bs.to_string,
std::allocator >() << std::endl;
}

I receive the following output from this command:

$ g++ -W -Wall -ansi -pedantic -O0 test.cpp -o test && ./test
32
32


but if i enable optimizations, i get this instead:

$ g++ -W -Wall -ansi -pedantic -O1 test.cpp -o test && ./test
-1217882104
32


here's where it get's interesting... If i put some code in the specialized
version of find_last, it goes back to behaving as expected:

template <>
int find_last(const std::bitset<32> &bs) {
const int x = __builtin_clz(bs.to_ulong());
std::cout << "\n";
return (x != 31) ? 32 - x - 1 : 32;
}

$ g++ -W -Wall -ansi -pedantic -O1 test.cpp -o test && ./test

32
32


I am having a hard time figuring out which optimization flag is causing this.
Inspecing with -Q shows me that the following flags are enabled by -O1
(-fcprop-registers -fdefer-pop -fforward-propagate -fguess-branch-probability
-fif-conversion -fif-conversion2 -fipa-pure-const -fipa-reference
-fmerge-constants -fomit-frame-pointer -fsplit-wide-types -ftree-ccp -ftree-ch
-ftree-copy-prop -ftree-copyrename -ftree-dce -ftree-dominator-opts -ftree-dse
-ftree-fre -ftree-sink -ftree-sra -ftree-ter) yet manually enabling all of
these, doesn't cause the behavior.


-- 
   Summary: __builtin_clz is behaving differently with different
optimization levels
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eteran at alum dot rit dot edu


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



[Bug c++/44330] __builtin_clz is behaving differently with different optimization levels

2010-05-30 Thread eteran at alum dot rit dot edu


--- Comment #1 from eteran at alum dot rit dot edu  2010-05-30 07:07 ---
I just noticed that the documentation for __builtin_clz and __builtin_ffsl say
the result is undefined if x is 0. Therefore, this bug is invalid, sorry for
the false bug report.


-- 

eteran at alum dot rit dot edu changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug middle-end/44308] ranlib: file: libbackend

2010-05-30 Thread jay dot krell at cornell dot edu


--- Comment #2 from jay dot krell at cornell dot edu  2010-05-30 08:06 
---
I understand it is "ok".
Question is: Do you want to be warning free?
At what cost?
I think you do, at some finite cost, and I think the change is worthwhile here.
This isn't adding symbols at random, it is adding them in a small safe way that
fixes the warnings, leading more configurations, common ones, to be
warning-free.


-- 


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



[Bug other/44331] New: suggest drop fixincludes oneprocess and just maintain twoprocess

2010-05-30 Thread jay dot krell at cornell dot edu
Fixincludes has two ways of doing things: "oneprocess" and "twoprocess".
It appears that oneprocess is more often used, presumably slightly faster, but
that twoprocess is more portable and would work everywhere oneprocess is used.


Suggest just keeping one portable form and removing the other.
Less code to maintain and less autoconfing is generally better, unless the
advantages are sufficient to motivate the extra work and reduced portability.


-- 
   Summary: suggest drop fixincludes oneprocess and just maintain
twoprocess
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jay dot krell at cornell dot edu


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



[Bug other/44331] suggest drop fixincludes oneprocess and just maintain twoprocess

2010-05-30 Thread jay dot krell at cornell dot edu


--- Comment #1 from jay dot krell at cornell dot edu  2010-05-30 08:46 
---
Created an attachment (id=20778)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20778&action=view)
Something like the attached, which is strictly removal of code (plus "inlining"
of "twoprocess" in Makefile.in)

This would also address part of
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44252 (VMS).


-- 


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



[Bug middle-end/44308] ranlib: file: libbackend

2010-05-30 Thread jay dot krell at cornell dot edu


--- Comment #3 from jay dot krell at cornell dot edu  2010-05-30 08:55 
---
Hm. There are more. Perhaps better to not compile/lib/link files that can be
easily predicted to have no symbols? Maybe just ignore it. Maybe get Apple to
change ranlib. Maybe they already have.

ranlib: file: ../.././gcc/libgcc.a(_trampoline.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_ctors.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_powitf2.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_multc3.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_divtc3.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_fixtfdi.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_fixunstfdi.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_floatditf.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_floatunditf.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_fixsfti.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_fixdfti.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_fixxfti.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_fixtfti.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_fixunssfti.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_fixunsdfti.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_fixunsxfti.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_fixunstfti.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_floattisf.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_floattidf.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_floattixf.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_floattitf.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_floatuntisf.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_floatuntidf.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_floatuntixf.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(_floatuntitf.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(darwin-64.o) has no symbols
ranlib: file: ../.././gcc/libgcc.a(unwind-sjlj.o) has no symbols


-- 


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



[Bug c++/44328] switch/case optimization produces an invalid jump table index

2010-05-30 Thread eblot dot ml at gmail dot com


--- Comment #1 from eblot dot ml at gmail dot com  2010-05-30 10:36 ---
Update: This is a C++ only bug, the same code in C language does not exhibit
the bug:


# --- Building as C language ---
$> arm-eabi-gcc -c -O2 -mcpu=arm926ej-s -o fopen.o -x c fopen.c -Wextra
-save-temps && cat fopen.s
.cpu arm926ej-s
.fpu softvfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 1
.eabi_attribute 30, 2
.eabi_attribute 18, 4
.file   "fopen.c"
.text
.align  2
.global open_file
.type   open_file, %function
open_file:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
cmp r1, #3
ldrls   r3, .L4
movhi   r1, #0
ldrls   r1, [r3, r1, asl #2]
b   open
.L5:
.align  2
.L4:
.word   .LANCHOR0
.size   open_file, .-open_file
.section.rodata
.align  2
.set.LANCHOR0,. + 0
.type   CSWTCH.1, %object
.size   CSWTCH.1, 16
CSWTCH.1:
.word   1
.word   74
.word   3
.word   75
.ident  "GCC: 4.5.0"

# --- Building as C++ language ---
arm-eabi-gcc -c -O2 -mcpu=arm926ej-s -o fopen.o -x c++ fopen.c -Wextra
-save-temps && cat fopen.s
fopen.c: In function ‘void open_file(const char*, OpenMode)’:
fopen.c:16:6: warning: comparison always true due to limited range of data type
.cpu arm926ej-s
.fpu softvfp
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 1
.eabi_attribute 30, 2
.eabi_attribute 18, 4
.file   "fopen.c"
.text
.align  2
.global _Z9open_filePKc8OpenMode
.type   _Z9open_filePKc8OpenMode, %function
_Z9open_filePKc8OpenMode:
.fnstart
.LFB0:
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
@ link register save eliminated.
ldr r3, .L2
sub r1, r1, #1
and r1, r1, #255
ldr r1, [r3, r1, asl #2]
b   _Z4openPKci
.L3:
.align  2
.L2:
.word   .LANCHOR0
.LFE0:
.cantunwind
.fnend
.size   _Z9open_filePKc8OpenMode, .-_Z9open_filePKc8OpenMode
.section.rodata
.align  2
.set.LANCHOR0,. + 0
.type   CSWTCH.1, %object
.size   CSWTCH.1, 12
CSWTCH.1:
.word   74
.word   3
.word   75
.ident  "GCC: 4.5.0"


-- 


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



[Bug objc/44140] ObjC lto/whopr fails

2010-05-30 Thread iains at gcc dot gnu dot org


--- Comment #13 from iains at gcc dot gnu dot org  2010-05-30 12:25 ---
In a bid to remove cases where the FE is bypassing varpool/cgraph and going
directly to asm

I've replaced the (2) instances of mark_decl_referenced () with DECL_PRESERVE_P
() =1 (Honza's suggestion)

I've removed the code in handle_class_ref () entirely [via an intermediate step
where I got it to emit code without using the asm def].
I've removed the code that outputs a class ref in handle_impent () [also via n
intermediate step].

none of these actions makes any difference to the testsuite results, nor to the
failure with -flto.

Adding Mike .. 

HJ - would you prefer this to be closed and for me to open a new bug to track
the real issue?


-- 

iains at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||mrs at gcc dot gnu dot org


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



[Bug libstdc++/44268] abi docs say that hppa-linux defaults to libgcc_s.so.2

2010-05-30 Thread redi at gcc dot gnu dot org


--- Comment #6 from redi at gcc dot gnu dot org  2010-05-30 12:39 ---
that's fine I'll be able to update the docs from that info - thanks


-- 


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



[Bug c/44310] utf8 quotes in warnings make them look like garbage in many contexts

2010-05-30 Thread jay dot krell at cornell dot edu


--- Comment #4 from jay dot krell at cornell dot edu  2010-05-30 13:24 
---
It's MacOSX for local console, remote to Debian, Solaris, OpenBSD, etc., I
can't keep track of when it works and when it doesn't, but it often doesn't.


Local console works fine.
As the bug says "in many contexts", not "all contexts".


Things are garbled when pasted into web forms, cvs commits, going through ssh.
Is there really a way to communicate this stuff through the various usual
channels? I don't configure the heck out of everything and I expect defaults to
be reasonable. I don't expect compiler messages to be so quick to get garbled.


If input is only 7 bit ASCII, then output should only be 7 bit ASCII.
When I start presenting the compiler with characters beyond that, it can give
them back to me.


-- 


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



[Bug target/44332] New: ICE: in copy_to_mode_reg, at explow.c:623 with -mno-sse2

2010-05-30 Thread zsojka at seznam dot cz
Compiler output:
$ gcc -mno-sse2 testcase.c
testcase.c: In function 'foo':
testcase.c:6:6: internal compiler error: in copy_to_mode_reg, at explow.c:635
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Tested revisions:
r160048 - crash
r153685 - crash
4.4 r158133 - crash

- testcase.c -
typedef __attribute__((vector_size(16))) char type;

extern void bar(type);
void foo(type x) { bar(x); }
--


A bit different testcase gives:

$ gcc -mno-sse2 testcase2.c
testcase2.c: In function 'foo':
testcase2.c:4:29: internal compiler error: in emit_move_insn, at expr.c:3428
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

- testcase2.c -
typedef __attribute__((vector_size(16))) char type;

extern void bar(type);
void foo(void) { type x; bar(x); }
---


-- 
   Summary: ICE: in copy_to_mode_reg, at explow.c:623 with -mno-sse2
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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



[Bug objc/44140] ObjC lto/whopr fails

2010-05-30 Thread iains at gcc dot gnu dot org


--- Comment #14 from iains at gcc dot gnu dot org  2010-05-30 13:42 ---
Created an attachment (id=20779)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20779&action=view)
patch to add LTO tests to OobjC


This adds an LTO directory to objc.dg and a single test (trivial_0.m) which is
the code at comment #5 (with the object renamed to 'myRootObject' so that it
doesn't clash with the root 'Object' provided in libobjc.)


-- 


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



[Bug c++/44328] switch/case optimization produces an invalid jump table index

2010-05-30 Thread mikpe at it dot uu dot se


--- Comment #2 from mikpe at it dot uu dot se  2010-05-30 14:50 ---
I can confirm this wrong-code when gcc 4.4/4.5 targets arm-unknown-eabi.
However, a 4.4/4.5 running natively on arm-unknown-linux-gnueabi does not
exhibit this behaviour.  There there's no 'comparison always true' warning, and
the generated code contains conditional instructions where the arm-unknown-eabi
gcc emitted unconditional instructions.

This is what 4.5-20100527 generates for me on arm-unknown-linux-gnueabi:

sub r1, r1, #1
cmp r1, #2
ldrls   r3, .L4
movhi   r1, #1
ldrls   r1, [r3, r1, asl #2]
b   open
.L5:
.align  2
.L4:
.word   .LANCHOR0
.size   _Z9open_filePKc8OpenMode, .-_Z9open_filePKc8OpenMode
.section.rodata
.align  2
.LANCHOR0 = . + 0
.type   CSWTCH.2, %object
.size   CSWTCH.2, 12
CSWTCH.2:
.word   74
.word   3
.word   75

My guess is that the subtract+compare is done in a too narrow mode, resulting
in the warning and subsequent omission of the conditionals.

Also, it's not a jump table but a lookup table.


-- 

mikpe at it dot uu dot se changed:

   What|Removed |Added

 CC||mikpe at it dot uu dot se


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



[Bug objc/44140] ObjC lto/whopr fails

2010-05-30 Thread iains at gcc dot gnu dot org


--- Comment #15 from iains at gcc dot gnu dot org  2010-05-30 14:51 ---
we emit the meta-data [mostly tabular] for the runtime on the basis of
DECL_PRESERVE_P (or mark_decl_referenced () in the trunk version). 

The initlist for these decls contains references to the classes and methods.  
I wonder if this is hiding the relationship from lto?  


-- 


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



[Bug objc/44140] ObjC lto/whopr fails

2010-05-30 Thread hjl dot tools at gmail dot com


--- Comment #16 from hjl dot tools at gmail dot com  2010-05-30 14:58 
---
(In reply to comment #13)

> HJ - would you prefer this to be closed and for me to open a new bug to track
> the real issue?
> 

I opened this bug to report

objc.dg/torture/tls/thr-init-3.m

Since it is XFAILED, I have no issues now.


-- 


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



[Bug target/44129] Building linux kernel with gcc-4.5.0 and CONFIG_CC_OPTIMIZE_FOR_SIZE segfaults

2010-05-30 Thread itosre at trash-mail dot com


--- Comment #13 from itosre at trash-mail dot com  2010-05-30 15:09 ---
(In reply to comment #12)
> I'm assuming this is current Linus git (post 2.6.34).

I'm guessing from  

>Tested on several kernels:  2.6.32.8, 2.6.33.4, 2.6.34-rc7

That this isn't the case. Strangely enough, it WFT with 2.6.33* but not with
2.6.34 and 2.6.34-git*.

Even without Os (in which case 2.6.34 boots), Make fails to xmalloc on a
2.6.34+ kernel and segfaults, perhaps from compiling libc with 4.5.0? Perhaps
another bug entirely.


-- 


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



[Bug target/44332] ICE: in copy_to_mode_reg, at explow.c:623 with -mno-sse2

2010-05-30 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2010-05-30 15:21 ---
Well, "doctor it hurts when I do that ..."


-- 


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



[Bug c++/44333] New: Ambiguity with typedef and using namespace

2010-05-30 Thread paolo dot carlini at oracle dot com
I would really like this to be possible, would help me a lot in getting rid of
 uses in the library, and it is indeed possible with ICC and Comeau,
and SunStudio, but GCC doesn't like it, for some reason.

typedef unsigned my_size_t;

namespace my
{
  typedef unsigned my_size_t;
}

using namespace my;
my_size_ts1;  // error

namespace my2
{
  using namespace my;
  my_size_t  s1;  // error
}

I'm pretty sure to have seen it already, still... Jason what do you think?


-- 
   Summary: Ambiguity with typedef and using namespace
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: paolo dot carlini at oracle dot com


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



[Bug c++/44333] Ambiguity with typedef and using namespace

2010-05-30 Thread paolo dot carlini at oracle dot com


--- Comment #1 from paolo dot carlini at oracle dot com  2010-05-30 15:54 
---
And replacing both:

  using namespace my;

with

  using my::my_size_t;

instead works. This is crazy (IMHO ;) and would not be a workaround for me)


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

Version|4.5.0   |4.6.0


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



[Bug target/44332] ICE: in copy_to_mode_reg, at explow.c:623 with -mno-sse2

2010-05-30 Thread steven at gcc dot gnu dot org


--- Comment #2 from steven at gcc dot gnu dot org  2010-05-30 16:55 ---
Should not ICE, though.


-- 


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



[Bug web/44318] gcc-4.3.5 release in wrong dir

2010-05-30 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2010-05-30 16:57 ---
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=44318



[Bug rtl-optimization/44249] [4.4/4.5/4.6 Regression] IRA generates extra register move

2010-05-30 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Keywords||missed-optimization, ra
   Priority|P3  |P2


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



[Bug tree-optimization/44258] [4.5/4.6 Regression] possible SRA wrong-code generation.

2010-05-30 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||wrong-code
   Priority|P3  |P1
   Last reconfirmed|-00-00 00:00:00 |2010-05-30 17:04:29
   date||


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



[Bug target/44290] [4.5 Regression] __naked attribute is broken

2010-05-30 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P2


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



[Bug c++/44301] [4.5 Regression] g++ ICE on complicated template code

2010-05-30 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P2


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



[Bug lto/44334] New: [4.6 Regression] rnflow.f90 ~27% slower with -fwhole-program -flto after revision 159852

2010-05-30 Thread dominiq at lps dot ens dot fr
After revision 159852

Author: pault
Date:   Wed May 26 05:11:04 2010 UTC (4 days, 12 hours ago)
Changed paths:  4
Log Message:
2010-05-26  Paul Thomas  

PR fortran/40011
* resolve.c (resolve_global_procedure): Resolve the gsymbol's
namespace before trying to reorder the gsymbols.

2010-05-26  Paul Thomas  

PR fortran/40011
* gfortran.dg/whole_file_19.f90 : New test.

the executable of the polyhedron test rnflow.f90 is ~27% slower when compiled
with -fwhole-program -flto:

[macbook] lin/test% gfcpf -v
Using built-in specs.
COLLECT_GCC=gfcpf
COLLECT_LTO_WRAPPER=/opt/gcc/gcc4.6pf/libexec/gcc/x86_64-apple-darwin10/4.6.0/lto-wrapper
Target: x86_64-apple-darwin10
Configured with: ../p_work/configure --prefix=/opt/gcc/gcc4.6pf
--mandir=/opt/gcc/gcc4.6pf/share/man --infodir=/opt/gcc/gcc4.6pf/share/info
--build=x86_64-apple-darwin10 --host=x86_64-apple-darwin10
--target=x86_64-apple-darwin10 --enable-languages=c,fortran
--with-gmp=/opt/sw64 --with-libiconv-prefix=/opt/sw64 --with-system-zlib
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
--with-cloog=/opt/sw64 --with-ppl=/opt/sw64 --with-mpc=/opt/sw64 --enable-lto
Thread model: posix
gcc version 4.6.0 20100526 (experimental) [trunk revision 159851] (GCC) 
[macbook] lin/test% gfcpf -O3 -ffast-math -funroll-loops -fomit-frame-pointer
rnflow.f90 
[macbook] lin/test% time a.out > /dev/null
25.826u 0.686s 0:26.52 99.9%0+0k 0+0io 0pf+0w
[macbook] lin/test% gfcpf -O3 -ffast-math -funroll-loops -fomit-frame-pointer
-fwhole-file -flto rnflow.f90
[macbook] lin/test% time a.out > /dev/null
25.506u 0.674s 0:26.19 99.9%0+0k 0+0io 0pf+0w
[macbook] lin/test% gfcpf -O3 -ffast-math -funroll-loops -fomit-frame-pointer
-fwhole-program -flto rnflow.f90
[macbook] lin/test% time a.out > /dev/null
25.772u 0.678s 0:26.46 99.9%0+0k 0+0io 0pf+0w
[macbook] lin/test% gfcp -v
Using built-in specs.
COLLECT_GCC=gfcp
COLLECT_LTO_WRAPPER=/opt/gcc/gcc4.6p/libexec/gcc/x86_64-apple-darwin10/4.6.0/lto-wrapper
Target: x86_64-apple-darwin10
Configured with: ../p_work/configure --prefix=/opt/gcc/gcc4.6p
--mandir=/opt/gcc/gcc4.6p/share/man --infodir=/opt/gcc/gcc4.6p/share/info
--build=x86_64-apple-darwin10 --host=x86_64-apple-darwin10
--target=x86_64-apple-darwin10 --enable-languages=c,fortran
--with-gmp=/opt/sw64 --with-libiconv-prefix=/opt/sw64 --with-system-zlib
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
--with-cloog=/opt/sw64 --with-ppl=/opt/sw64 --with-mpc=/opt/sw64 --enable-lto
Thread model: posix
gcc version 4.6.0 20100526 (experimental) [trunk revision 159852] (GCC) 
[macbook] lin/test% gfcp -O3 -ffast-math -funroll-loops -fomit-frame-pointer
rnflow.f90
[macbook] lin/test% time a.out > /dev/null
25.841u 0.696s 0:26.54 99.9%0+0k 0+0io 0pf+0w
[macbook] lin/test% gfcp -O3 -ffast-math -funroll-loops -fomit-frame-pointer
-fwhole-file -flto rnflow.f90
[macbook] lin/test% time a.out > /dev/null
25.540u 0.677s 0:26.22 99.9%0+0k 0+0io 0pf+0w
[macbook] lin/test% gfcp -O3 -ffast-math -funroll-loops -fomit-frame-pointer
-fwhole-program -flto rnflow.f90
[macbook] lin/test% time a.out > /dev/null
32.627u 0.685s 0:33.31 99.9%0+0k 0+0io 0pf+0w <---  ~27% slower

As it has been noticed previously the executable of fatigue.f90 is ~30% faster
when compiled with -fwhole-program:

[macbook] lin/test% gfcp -O3 -ffast-math -funroll-loops -fomit-frame-pointer
-fwhole-file -flto fatigue.f90
[macbook] lin/test% time a.out > /dev/null
9.031u 0.006s 0:09.04 99.8% 0+0k 0+1io 0pf+0w
[macbook] lin/test% gfcp -O3 -ffast-math -funroll-loops -fomit-frame-pointer
-fwhole-program fatigue.f90
[macbook] lin/test% time a.out > /dev/null
6.448u 0.004s 0:06.47 99.5% 0+0k 0+1io 0pf+0w


-- 
   Summary: [4.6 Regression] rnflow.f90 ~27% slower with -fwhole-
program -flto after revision 159852
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dominiq at lps dot ens dot fr
 GCC build triplet: x86_64-apple-darwin10
  GCC host triplet: x86_64-apple-darwin10
GCC target triplet: x86_64-apple-darwin10


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



[Bug c++/44328] switch/case optimization produces an invalid jump table index

2010-05-30 Thread eblot dot ml at gmail dot com


--- Comment #3 from eblot dot ml at gmail dot com  2010-05-30 17:36 ---
> I can confirm this wrong-code when gcc 4.4/4.5 targets arm-unknown-eabi.
> However, a 4.4/4.5 running natively on arm-unknown-linux-gnueabi does not
exhibit this behaviour. 

IIRC, Linux ABI does not follow the ARM AAPCS that uses variable-width
enumeration.
On Linux, enumerated values are stored as a native integer value, whatever the
enumerated values. With AAPCS/ATPCS, if the enumerated values can be stored as
a byte, a byte is used: --with-abi=aapcs
I don't know if the issue is related to this ABI discrepancy.

> Also, it's not a jump table but a lookup table.
Sorry, my mistake.


-- 


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



[Bug lto/44334] [4.6 Regression] rnflow.f90 ~27% slower with -fwhole-program -flto after revision 159852

2010-05-30 Thread dominiq at lps dot ens dot fr


--- Comment #1 from dominiq at lps dot ens dot fr  2010-05-30 18:06 ---
I'll attach the assembly generated with -O3 -ffast-math -funroll-loops
-fomit-frame-pointer -flto for revisions 159851 and 159852. It is the same
with/without -fwhole-program (probably obvious), however when assembled and
linked with 

gfcp -O3 -ffast-math -funroll-loops -fomit-frame-pointer -fwhole-program -flto
rnflow_wp5*.s

the timing depends on the revision used to generate the assembly, but not on
the compiler revision.


-- 

dominiq at lps dot ens dot fr changed:

   What|Removed |Added

 CC||rguenther at suse dot de, jh
   ||at suse dot cz, pault at gcc
   ||dot gnu dot org


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



[Bug fortran/44334] rnflow.f90 ~27% slower with -fwhole-program -flto after revision 159852

2010-05-30 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2010-05-30 18:09 ---
Insufficient analysis.  This more sounds like a dup of profile-estimate
messed up by inlining.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

  Component|lto |fortran
Summary|[4.6 Regression] rnflow.f90 |rnflow.f90 ~27% slower with
   |~27% slower with -fwhole-   |-fwhole-program -flto after
   |program -flto after revision|revision 159852
   |159852  |


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



[Bug fortran/44334] rnflow.f90 ~27% slower with -fwhole-program -flto after revision 159852

2010-05-30 Thread dominiq at lps dot ens dot fr


--- Comment #3 from dominiq at lps dot ens dot fr  2010-05-30 18:10 ---
Created an attachment (id=20780)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20780&action=view)
Assembly generated with  -O3 -ffast-math -funroll-loops -fomit-frame-pointer
-flto and revision 159851


-- 


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



[Bug fortran/44334] rnflow.f90 ~27% slower with -fwhole-program -flto after revision 159852

2010-05-30 Thread dominiq at lps dot ens dot fr


--- Comment #4 from dominiq at lps dot ens dot fr  2010-05-30 18:12 ---
Created an attachment (id=20781)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20781&action=view)
Assembly generated with  -O3 -ffast-math -funroll-loops -fomit-frame-pointer
-flto and revision 159852


-- 


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



[Bug fortran/44334] rnflow.f90 ~27% slower with -fwhole-program -flto after revision 159852

2010-05-30 Thread dominiq at lps dot ens dot fr


--- Comment #5 from dominiq at lps dot ens dot fr  2010-05-30 18:30 ---
Output of gprof on darwin:

Revision 159851:

  called/total   parents 
index  %timeself descendents  called+selfname   index
  called/total   children

  520605 _dgetf2_ [81]
0.000.00  64/1041192 ___timctr_MOD_gettim
[1429]
0.000.006548/1041192 _dswap_ [4112]
0.000.00 1034580/1041192 _xerbla_ [83]
[81] 0.00.000.00 1041192+520605 _dgetf2_ [81]
0.000.00   64137/110864  _dgetrf_ [82]
  520605 _dgetf2_ [81]

---

   13315 _dgetrf_ [82]
0.000.00   8/110864  ___timctr_MOD_gettim
[1429]
0.000.006548/110864  _dswap_ [4112]
0.000.006685/110864  __dyld_func_lookup [1665]
0.000.00   33486/110864  _xerbla_ [83]
0.000.00   64137/110864  _dgetf2_ [81]
[82] 0.00.000.00  110864+13315  _dgetrf_ [82]
0.000.00   1/1   _main [85]
   13315 _dgetrf_ [82]

---

0.000.00   10872/10872   _dswap_ [4112]
[83] 0.00.000.00   10872 _xerbla_ [83]
0.000.00 1034580/1041192 _dgetf2_ [81]
0.000.00   33486/110864  _dgetrf_ [82]

---

0.000.00   1/1   _main [85]
[84] 0.00.000.00   1 __start [84]

---

0.000.00   1/1   _dgetrf_ [82]
[85] 0.00.000.00   1 _main [85]
0.000.00   1/1   __start [84]

---

...

  %   cumulative   self  self total   
 time   seconds   secondscalls  ms/call  ms/call  name
  0.0   0.00 0.00  1561733 0.00 0.00  _dgetf2_ [81]
  0.0   0.00 0.00   110927 0.00 0.00  _dgetrf_ [82]
  0.0   0.00 0.0010872 0.00 0.00  _xerbla_ [83]
  0.0   0.00 0.001 0.00 0.00  __start [84]
  0.0   0.00 0.001 0.00 0.00  _main [85]



Revision 159852:

  called/total   parents 
index  %timeself descendents  called+selfname   index
  called/total   children

0.000.006548/1561733 _dswap_ [4112]
0.000.00 1555185/1561733 _xerbla_ [83]
[81] 0.00.000.00 1561733 _dgetf2_ [81]
0.000.00   64136/110927  _dgetrf_ [82]

---

   13315 _dgetrf_ [82]
0.000.00  72/110927  ___timctr_MOD_gettim
[1429]
0.000.006548/110927  _dswap_ [4112]
0.000.006685/110927  __dyld_func_lookup [1665]
0.000.00   33486/110927  _xerbla_ [83]
0.000.00   64136/110927  _dgetf2_ [81]
[82] 0.00.000.00  110927+13315  _dgetrf_ [82]
0.000.00   1/1   _main [85]
   13315 _dgetrf_ [82]

---

0.000.00   10872/10872   _dswap_ [4112]
[83] 0.00.000.00   10872 _xerbla_ [83]
0.000.00 1555185/1561733 _dgetf2_ [81]
0.000.00   33486/110927  _dgetrf_ [82]

---

0.000.00   1/1   _main [85]
[84] 0.00.000.00   1 __start [84]

---

0.000.00   1/1   _dgetrf_ [82]
[85] 0.00.000.00   1 _main [85]
0.000.00   1/1   __start [84]

---

...

  %   cumulative   self  self total   
 time   seconds   secondscalls  ms/call  ms/call  name
  0.0   0.00 0.00  5572994 0.00 0.00  _xerbla_ [154]
  0.0   0.00 0.0020556 0.00 0.00  _ds

[Bug fortran/44334] rnflow.f90 ~27% slower with -fwhole-program -flto after revision 159852

2010-05-30 Thread rguenth at gcc dot gnu dot org


--- Comment #6 from rguenth at gcc dot gnu dot org  2010-05-30 18:48 ---
 0.0   0.00 0.00  5572994 0.00 0.00  _xerbla_ [154]

eh?  that's the blas error handler.  something is fishy with your setup.


-- 


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



[Bug fortran/44334] rnflow.f90 ~27% slower with -fwhole-program -flto after revision 159852

2010-05-30 Thread dominiq at lps dot ens dot fr


--- Comment #7 from dominiq at lps dot ens dot fr  2010-05-30 18:55 ---
> Insufficient analysis.  This more sounds like a dup of profile-estimate
> messed up by inlining.

Do you mean a dup of pr40106? Or is there others I am not aware of?

> eh?  that's the blas error handler.  something is fishy with your setup.

Which setup?


-- 


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



[Bug middle-end/42975] eh-cleanup should be able to clear DECL_FUNCTION_PERSONALITY

2010-05-30 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2010-05-30 19:53 ---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

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


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



[Bug middle-end/42975] eh-cleanup should be able to clear DECL_FUNCTION_PERSONALITY

2010-05-30 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2010-05-30 19:53 ---
Subject: Bug 42975

Author: rguenth
Date: Sun May 30 19:52:53 2010
New Revision: 160059

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160059
Log:
2010-05-30  Richard Guenther  

PR lto/42975
* tree-eh.c (execute_cleanup_eh_1): Copy from execute_cleanup_eh.
(execute_cleanup_eh): Clear DECL_FUNCTION_PERSONALITY if it is
no longer needed.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-eh.c


-- 


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



[Bug bootstrap/44335] New: [4.6 regression] gcc-4.6-20100529 java bootstrap failure on arm-linux-gnueabi

2010-05-30 Thread mikpe at it dot uu dot se
Attempting to bootstrap gcc-4.6-20100529 on armv5tel-unknown-linux-gnueabi with
java enabled fails:

...
In file included from /home/mikpe/gcc-4.6-20100529/gcc/java/except.c:33:0:
/home/mikpe/gcc-4.6-20100529/gcc/except.h:322:6: error: #error
"EH_RETURN_DATA_REGNO required"
/home/mikpe/gcc-4.6-20100529/gcc/except.h:325:6: error: #error
"{DWARF2,TARGET}_UNWIND_INFO required"
/home/mikpe/gcc-4.6-20100529/gcc/except.h:329:6: error: #error
"EH_RETURN_HANDLER_RTX or eh_return required"
/home/mikpe/gcc-4.6-20100529/gcc/except.h:335:6: error: #error "Must use SJLJ
exceptions but configured not to"
make[3]: *** [java/except.o] Error 1
make[3]: Leaving directory `/home/mikpe/objdir46/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/home/mikpe/objdir46'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/home/mikpe/objdir46'
make: *** [bootstrap] Error 2

Configured with: /home/mikpe/gcc-4.6-20100529/configure --enable-bootstrap
--enable-shared --enable-threads=posix --enable-checking=release
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran --enable-java-awt=gtk
--disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --disable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--disable-sjlj-exceptions --with-arch=armv5te --with-tune=xscale
--build=armv5tel-brewer-linux-gnueabi
--with-gmp=/home/mikpe/pkgs/linux-armv5l/gmp-4.3.2
--with-mpfr=/home/mikpe/pkgs/linux-armv5l/mpfr-2.4.2
--with-mpc=/home/mikpe/pkgs/linux-armv5l/mpc-0.8.1 --disable-plugin
--disable-lto --disable-libmudflap

The gcc-4.6-20100515 weekly snapshot bootstrapped fine with the same
configuration options.


-- 
   Summary: [4.6 regression] gcc-4.6-20100529 java bootstrap failure
on arm-linux-gnueabi
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mikpe at it dot uu dot se
 GCC build triplet: armv5tel-unknown-linux-gnueabi
  GCC host triplet: armv5tel-unknown-linux-gnueabi
GCC target triplet: armv5tel-unknown-linux-gnueabi


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



[Bug bootstrap/44335] [4.6 regression] gcc-4.6-20100529 java bootstrap failure on arm-linux-gnueabi

2010-05-30 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2010-05-30 20:45 ---
Should be fixed with

2010-05-30  Steven Bosscher  

* except.c: Include tm.h.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/44336] New: [4.6 Regression] ICE: verify_ssa failed: SSA_NAME_DEF_STMT is wrong with -fipa-struct-reorg -fwhole-program

2010-05-30 Thread zsojka at seznam dot cz
Tested revisions:
r160052 - crash
r159523 - segfault (release checking)
r159387 - OK
r158969 - OK
r158095 - OK

Compiler output:
$ gcc -O1 -fipa-struct-reorg -fwhole-program testcase.c
testcase.c: In function 'main':
testcase.c:4:3: warning: return makes integer from pointer without a cast
[enabled by default]
testcase.c:4:3: warning: function returns address of local variable [enabled by
default]
testcase.c:5:1: error: SSA_NAME_DEF_STMT is wrong
Expected definition statement:
s.0_1 = (long int) &s.1;

Actual definition statement:
s.0_1 = (long int) &s;
testcase.c:5:1: internal compiler error: verify_ssa failed
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

- testcase.c -
int main ()
{
  struct { int i; } s[1];
  return s;
}
--


-- 
   Summary: [4.6 Regression] ICE: verify_ssa failed:
SSA_NAME_DEF_STMT is wrong with -fipa-struct-reorg -
fwhole-program
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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



[Bug debug/44337] New: [4.5/4.6 Regression] ICE: in expand_assignment, at expr.c:4276

2010-05-30 Thread zsojka at seznam dot cz
Compiler output:
$ gcc -O -fno-tree-dce -fno-tree-dse testcase.c
testcase.c: In function ‘foo’:
testcase.c:4:8: internal compiler error: in expand_assignment, at expr.c:4280
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Tested revisions:
r160052 - crash
r153685 - crash
4.4 r156591 - OK

- testcase.c -
void foo (void)
{
  _Complex float v[1];
  v[1] = 0;
}
--
(reduced from gcc.dg/debug/pr41717.c)


-- 
   Summary: [4.5/4.6 Regression] ICE: in expand_assignment, at
expr.c:4276
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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



[Bug target/44338] New: -mno-fused-madd causes FAIL: gcc.target/i386/sse-23.c (internal compiler error)

2010-05-30 Thread zsojka at seznam dot cz
Tested revisions:
r160052 - crash

Compiler output:
$ gcc -mno-fused-madd /mnt/svn/gcc-trunk/gcc/testsuite/gcc.target/i386/sse-23.c
In file included from
/mnt/svn/gcc-trunk/binary-160052-lto-fortran/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include/x86intrin.h:69:0,
 from
/mnt/svn/gcc-trunk/gcc/testsuite/gcc.target/i386/sse-23.c:146:
/mnt/svn/gcc-trunk/binary-160052-lto-fortran/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include/fma4intrin.h:
In function '_mm_macc_ps':
/mnt/svn/gcc-trunk/binary-160052-lto-fortran/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include/fma4intrin.h:43:1:
error: unrecognizable insn:
(insn 10 9 11 3
/mnt/svn/gcc-trunk/binary-160052-lto-fortran/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include/fma4intrin.h:42
(set (reg:V4SF 58 [ D.9069 ])
(unspec:V4SF [
(plus:V4SF (mult:V4SF (mem/c/i:V4SF (plus:DI (reg/f:DI 54
virtual-stack-vars)
(const_int -16 [0xfff0])) [0 __A+0
S16 A128])
(reg:V4SF 60))
(reg:V4SF 61))
] 150)) -1 (nil))
/mnt/svn/gcc-trunk/binary-160052-lto-fortran/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include/fma4intrin.h:43:1:
internal compiler error: in extract_insn, at recog.c:2099
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


I would reduce the testcase, but it doesn't fail with -save-temps:
$ gcc -mno-fused-madd /mnt/svn/gcc-trunk/gcc/testsuite/gcc.target/i386/sse-23.c
-save-temps
In file included from
/mnt/svn/gcc-trunk/gcc/testsuite/gcc.target/i386/sse-23.c:143:0:
/mnt/svn/gcc-trunk/binary-160052-lto-fortran/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include/wmmintrin.h:34:3:
error: #error "AES/PCLMUL instructions not enabled"
In file included from
/mnt/svn/gcc-trunk/gcc/testsuite/gcc.target/i386/sse-23.c:144:0:
/mnt/svn/gcc-trunk/binary-160052-lto-fortran/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/include/smmintrin.h:32:3:
error: #error "SSE4.1 instruction set not enabled"


-- 
   Summary: -mno-fused-madd causes FAIL: gcc.target/i386/sse-23.c
(internal compiler error)
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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



[Bug libstdc++/44339] New: Usage of std::weak_ptr in ordered stl container (C++0x)

2010-05-30 Thread pcayouette at spoluck dot ca
When I try to compile a std::set< std::weak_ptr< int > >, it fails. However,
when I try to compile the exact same code but using boost::weak_ptr instead, it
works.


-- 
   Summary: Usage of std::weak_ptr in ordered stl container (C++0x)
   Product: gcc
   Version: 4.4.3
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pcayouette at spoluck dot ca
 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=44339



[Bug libstdc++/44339] Usage of std::weak_ptr in ordered stl container (C++0x)

2010-05-30 Thread pcayouette at spoluck dot ca


--- Comment #1 from pcayouette at spoluck dot ca  2010-05-31 00:18 ---
Created an attachment (id=20782)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20782&action=view)
Comparison between std case and boost case.

Uncomment the line 
//#define USING_STD_SHARED_PTR 
to expose the compilation error.


-- 


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



[Bug ada/44340] New: gcc (gnat) crash on allocation/initialization

2010-05-30 Thread marc dot criley at gmail dot com
GNAT bug box generated:

gcc-4.4 -c -g -gnatq -gnatQ test_tab.adb
+===GNAT BUG DETECTED==+
| 4.4.3 (i486-pc-linux-gnu) GCC error: |
| in gnat_to_gnu_entity, at ada/gcc-interface/decl.c:348   |
| Error detected at test_tab.adb:24:21 |
| 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-4.4 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.

test_tab.adb
aqmp_4_ada_h.ads

compilation abandoned

Files:
-
with Interfaces.C.Strings;
with AQMP_4_Ada_H;

procedure Test_Tab is

   use Interfaces;
   use Interfaces.C.Strings;

   use AQMP_4_Ada_H;

   Host : constant Chars_Ptr := New_String("127.0.0.1");
   Port : constant C.Int := 5672;

   Conn : access Connection_4_Ada := new Connection_4_Ada;

   procedure Declare_Queues(Conn : access Connection_4_Ada) is


   begin
  Conn.Open(Host, Port, Null_Ptr, Null_Ptr);
  declare
 Session : access Class_Session_4_Ada.Session_4_Ada;
  begin
 Session := new Class_Session_4_Ada.Session_4_Ada'(NewSession(Conn));
 Conn.Close;
 null;
  end;


   end Declare_Queues;

begin
   Declare_Queues(Conn);
end Test_Tab;

with Interfaces.C; use Interfaces.C;
with Interfaces.C.Strings;
with Interfaces.C.Extensions;
with Interfaces.Cpp;

package AQMP_4_Ada_h is

   subtype Bool is Unsigned_Char;

   package Class_Message_4_Ada is
  type Message_4_Ada is tagged limited record
 routingKey_u : Interfaces.C.Strings.chars_ptr;  -- AQMP_4_Ada.h:10:15
 contentType_u : Interfaces.C.Strings.chars_ptr;  -- AQMP_4_Ada.h:13:15
 contentEncoding_u : Interfaces.C.Strings.chars_ptr;  --
AQMP_4_Ada.h:14:15
 content_u : Interfaces.C.Strings.chars_ptr;  -- AQMP_4_Ada.h:15:15
  end record;
  pragma Import (CPP, Message_4_Ada);

  function New_Message_4_Ada return Message_4_Ada'Class;  --
AQMP_4_Ada.h:20:17
  pragma CPP_Constructor (New_Message_4_Ada, "_ZN13Message_4_AdaC1Ev");

  procedure setMessage
(this : access Message_4_Ada;
 priority : int;
 routingKey : Interfaces.C.Strings.chars_ptr;
 expirationTime : int;
 deliveryMode : int;
 contentType : Interfaces.C.Strings.chars_ptr;
 contentEncoding : Interfaces.C.Strings.chars_ptr;
 content : Interfaces.C.Strings.chars_ptr);  -- AQMP_4_Ada.h:28:24
  pragma Import (CPP, setMessage,
"_ZN13Message_4_Ada10setMessageEiPKciiS1_S1_S1_");

  procedure setPriority (this : access Message_4_Ada; priority : int);  --
AQMP_4_Ada.h:32:36
  pragma Import (CPP, setPriority, "_ZN13Message_4_Ada11setPriorityEi");

  function getRoutingKey (this : access Message_4_Ada) return
Interfaces.C.Strings.chars_ptr;  -- AQMP_4_Ada.h:34:29
  pragma Import (CPP, getRoutingKey,
"_ZN13Message_4_Ada13getRoutingKeyEv");

  procedure setRoutingKey (this : access Message_4_Ada; routingKey :
Interfaces.C.Strings.chars_ptr);  -- AQMP_4_Ada.h:36:45
  pragma Import (CPP, setRoutingKey,
"_ZN13Message_4_Ada13setRoutingKeyEPKc");

  function getContentType (this : access Message_4_Ada) return
Interfaces.C.Strings.chars_ptr;  -- AQMP_4_Ada.h:42:30
  pragma Import (CPP, getContentType,
"_ZN13Message_4_Ada14getContentTypeEv");

  function getContentEncoding (this : access Message_4_Ada) return
Interfaces.C.Strings.chars_ptr;  -- AQMP_4_Ada.h:44:34
  pragma Import (CPP, getContentEncoding,
"_ZN13Message_4_Ada18getContentEncodingEv");

  function getContent (this : access Message_4_Ada) return
Interfaces.C.Strings.chars_ptr;  -- AQMP_4_Ada.h:46:26
  pragma Import (CPP, getContent, "_ZN13Message_4_Ada10getContentEv");

  procedure setContent (this : access Message_4_Ada; content :
Interfaces.C.Strings.chars_ptr);  -- AQMP_4_Ada.h:48:38
  pragma Import (CPP, setContent, "_ZN13Message_4_Ada10setContentEPKc");
   end;
   use Class_Message_4_Ada;
   --  skipped empty struct Listener_4_Ada

   package Class_Session_4_Ada is
  type Session_4_Ada is tagged limited record
 null;
  end record;
  pragma Import (CPP, Session_4_Ada);

  function New_Session_4_Ada return Session_4_Ada'Class;  --
AQMP_4_Ada.h:59:17
  pragma CPP_Constructor (New_Session_4_Ada

[Bug libstdc++/44339] Usage of std::weak_ptr in ordered stl container (C++0x)

2010-05-30 Thread pcayouette at spoluck dot ca


--- Comment #2 from pcayouette at spoluck dot ca  2010-05-31 00:23 ---
(From update of attachment 20782)
Must have boost to compile the file.


-- 


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



[Bug libstdc++/44339] Usage of std::weak_ptr in ordered stl container (C++0x)

2010-05-30 Thread pcayouette at spoluck dot ca


--- Comment #3 from pcayouette at spoluck dot ca  2010-05-31 00:25 ---
Compile command:
g++ -O0 -g3 -Wall -std=c++0x -c -fmessage-length=0 -MMD -MP
-MF"src/TestCpp0x.d" -MT"src/TestCpp0x.d" -o"src/TestCpp0x.o"
"../src/TestCpp0x.cpp"


-- 


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



[Bug libstdc++/44339] Usage of std::weak_ptr in ordered stl container (C++0x)

2010-05-30 Thread pcayouette at spoluck dot ca


--- Comment #4 from pcayouette at spoluck dot ca  2010-05-31 00:26 ---
Error when #define line uncommented in example attached:
In file included from /usr/include/c++/4.4/memory:66,
 from ../src/TestCpp0x.cpp:1:
/usr/include/c++/4.4/bits/shared_ptr.h: In member function ‘bool
std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp =
std::weak_ptr]’:
/usr/include/c++/4.4/bits/stl_tree.h:1170:   instantiated from
‘std::pair::iterator, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare,
_Alloc>::_M_insert_unique(const _Val&) [with _Key = std::weak_ptr, _Val =
std::weak_ptr, _KeyOfValue = std::_Identity >, _Compare
= std::less >, _Alloc = std::allocator
>]’
/usr/include/c++/4.4/bits/stl_set.h:411:   instantiated from
‘std::pair, _Compare,
typename _Alloc::rebind<_Key>::other>::const_iterator, bool> std::set<_Key,
_Compare, _Alloc>::insert(const _Key&) [with _Key = std::weak_ptr,
_Compare = std::less >, _Alloc =
std::allocator >]’
../src/TestCpp0x.cpp:19:   instantiated from here
/usr/include/c++/4.4/bits/shared_ptr.h:1466: error: deleted function ‘bool
std::weak_ptr<_Tp>::operator<(const std::weak_ptr<_Tp1>&) const [with _Tp1 =
int, _Tp = int]’
/usr/include/c++/4.4/bits/stl_function.h:230: error: used here
make: *** [src/TestCpp0x.o] Error 1


-- 


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



[Bug target/44129] Building linux kernel with gcc-4.5.0 and CONFIG_CC_OPTIMIZE_FOR_SIZE segfaults

2010-05-30 Thread bdubbs at linuxfromscratch dot org


--- Comment #14 from bdubbs at linuxfromscratch dot org  2010-05-31 00:41 
---
(In reply to comment #13)
> (In reply to comment #12)
> > I'm assuming this is current Linus git (post 2.6.34).
> 
> I'm guessing from  
> 
> >Tested on several kernels:  2.6.32.8, 2.6.33.4, 2.6.34-rc7
> 
> That this isn't the case. 

Exactly right.  I'm using 2.6.33.4 for consistency.

I did look at arch/x86/kernel/tsc.c and modified it to remove the lone goto,
but the kernel panic upon boot persists.

This problem does seem to be specific to the combination of building on an
x86_64 and using -Os


-- 


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



[Bug libstdc++/44339] Usage of std::weak_ptr in ordered stl container (C++0x)

2010-05-30 Thread paolo dot carlini at oracle dot com


--- Comment #5 from paolo dot carlini at oracle dot com  2010-05-31 00:52 
---
I'm adding Jon in CC, but I think it's safe to close this PR as invalid: if you
look at n3090 (the latest working draft), it's clear that std::weak_ptr is
*not* LessThanComparable. However, if you change the snippet to use the TR1
weak_ptr it compiles, thus, I suspect the version of Boost you are using has
not been updated yet to the std::weak_ptr specifications of the latest draft.


-- 

paolo dot carlini at oracle dot com changed:

   What|Removed |Added

 CC|pcayouette at spoluck dot ca|jwakely dot gcc at gmail dot
   ||com
 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug libgcj/44341] New: [4.6 Regression] libjava cross build fails when configured with --with-gmp=

2010-05-30 Thread kkojima at gcc dot gnu dot org
Java enabled cross build for sh4-unknown-linux-gnu on i686-pc-linux-gnu
host fails during linking libjavamath.so:

libtool: link: /exp/ldroot/dodes/xsh-gcc-orig/./gcc/xgcc
-B/exp/ldroot/dodes/xsh-gcc-orig/./gcc/ -B/usr/local/sh4-unknown-linux-gnu/bin/
-B/usr/local/sh4-unknown-linux-gnu/lib/ -isystem
/usr/local/sh4-unknown-linux-gnu/include -isystem
/usr/local/sh4-unknown-linux-gnu/sys-include-shared 
.libs/gnu_java_math_GMP.o ../../../native/jni/classpath/.libs/jcl.o  
-L/opt2/i686-pc-linux-gnu/lib /opt2/i686-pc-linux-gnu/lib/libgmp.so   
-Wl,-soname -Wl,libjavamath.so -o .libs/libjavamath.so
/opt2/i686-pc-linux-gnu/lib/libgmp.so: could not read symbols: File in wrong
format
collect2: ld returned 1 exit status
make[6]: *** [libjavamath.la] Error 1

when configured with --with-gmp=/opt2/i686-pc-linux-gnu.  It seems
that

svn log libjava/classpath/configure.ac | head

r160037 | mrs | 2010-05-30 05:54:18 +0900 (Sun, 30 May 2010) | 4 lines

* configure.ac: Add multilib support for gmp.  Proper -I and -L
flags for gmp are added.
* configure: Regenerate.

doesn't work for cross builds and now attempts to link a host
gmp library specified with --with-gmp to the target library.


-- 
   Summary: [4.6 Regression] libjava cross build fails when
configured with --with-gmp=
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Keywords: build
  Severity: normal
  Priority: P3
 Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kkojima at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: sh4-unknown-linux-gnu


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



[Bug target/44129] Building linux kernel with gcc-4.5.0 and CONFIG_CC_OPTIMIZE_FOR_SIZE segfaults

2010-05-30 Thread hpa at zytor dot com


--- Comment #15 from hpa at zytor dot com  2010-05-31 01:04 ---
OK, thanks for confirming that it is not related to asm goto.


-- 


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



[Bug libstdc++/44339] Usage of std::weak_ptr in ordered stl container (C++0x)

2010-05-30 Thread paolo dot carlini at oracle dot com


--- Comment #6 from paolo dot carlini at oracle dot com  2010-05-31 01:24 
---
... and I think the correct way to achieve what you want now would be:

  std::set, std::owner_less>> wStdSet;


-- 


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



[Bug c++/43392] [C++0x]: segmentation fault with empty initializer list

2010-05-30 Thread catphive at catphive dot net


--- Comment #3 from catphive at catphive dot net  2010-05-31 03:43 ---
I've also run into this bug on Ubuntu with gcc version: gcc (Ubuntu
4.4.1-4ubuntu9) 4.4.1

The program that triggers it for me is this:
#include 
using std::vector;
int main(int argc, char* argv[]) {
vector v2 = {};
return 0;
}


-- 


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



[Bug ada/44340] internal error on allocation/initialization

2010-05-30 Thread ebotcazou at gcc dot gnu dot org


--- Comment #1 from ebotcazou at gcc dot gnu dot org  2010-05-31 06:54 
---
Please attach the gnatchop-ed file.


-- 

ebotcazou at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu dot
   ||org
 Status|UNCONFIRMED |WAITING
  GCC build triplet|i686-pc-linux-gn|i686-pc-linux-gnu
   GCC host triplet|i686-pc-linux-gn|i686-pc-linux-gnu
 GCC target triplet|i686-pc-linux-gn|i686-pc-linux-gnu
Summary|gcc (gnat) crash on |internal error on
   |allocation/initialization   |allocation/initialization
Version|unknown |4.4.3


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