[Bug middle-end/46142] [4.6 Regression] FMA test failures

2010-10-31 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46142

Uros Bizjak  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2010.10.31 06:55:48
   Target Milestone|--- |4.6.0
 Ever Confirmed|0   |1

--- Comment #4 from Uros Bizjak  2010-10-31 06:55:48 
UTC ---
Well, well.

static bool
vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt)
{
  ...
  enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
  ...

  /* Bail out if the function has more than three arguments, we do not have
 interesting builtin functions to vectorize with more than two arguments
 except for fma.  No arguments is also not good.  */
  if (nargs == 0 || nargs > 3)
return false;
  ...
}

For some reason, valgrind didn't cathc this problem. Anyway, the patch is
obvious:

Index: tree-vect-stmts.c
===
--- tree-vect-stmts.c(revision 166104)
+++ tree-vect-stmts.c(working copy)
@@ -1308,7 +1308,8 @@ vectorizable_call (gimple stmt, gimple_s
   loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
   tree fndecl, new_temp, def, rhs_type;
   gimple def_stmt;
-  enum vect_def_type dt[2] = {vect_unknown_def_type, vect_unknown_def_type};
+  enum vect_def_type dt[3]
+= {vect_unknown_def_type, vect_unknown_def_type, vect_unknown_def_type};
   gimple new_stmt = NULL;
   int ncopies, j;
   VEC(tree, heap) *vargs = NULL;


[Bug tree-optimization/46142] [4.6 Regression] FMA test failures

2010-10-31 Thread uros at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46142

--- Comment #5 from uros at gcc dot gnu.org 2010-10-31 07:18:13 UTC ---
Author: uros
Date: Sun Oct 31 07:18:07 2010
New Revision: 166105

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166105
Log:
PR tree-optimization/46142
* tree-vect-stmts.c (vectorizable_call): Enlarge dt array to
accommodate third function argument.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-vect-stmts.c


[Bug tree-optimization/46142] [4.6 Regression] FMA test failures

2010-10-31 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46142

Uros Bizjak  changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-p
   ||atches/2010-10/msg02658.htm
   ||l

--- Comment #6 from Uros Bizjak  2010-10-31 07:19:33 
UTC ---
Fixed.


[Bug c++/32402] Error while allocating array of pointers to objects of a pure virtual class

2010-10-31 Thread mark at tibanne dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32402

Mark Karpeles  changed:

   What|Removed |Added

 CC||mark at tibanne dot com

--- Comment #10 from Mark Karpeles  2010-10-31 
07:34:09 UTC ---
Ok, I've read the bug report following a report from a friend, and after
checking various sources I've come to the following conclusion:

new pure(*[3]) is not valid

When parsed, "new pure(*[3])" is parsed as "new instance of class pure with
parameter *[3]".

Anyway I see no logical reason why one would want to put part of its allocation
into parenthesis.

"new pure*[3]" should be perfectly acceptable, is easier to read, and is
accepted by GCC without problems.


Jonathan Wakely's example with decltype() is non related as decltype() is a new
compiler keyword, which is valid in this context, but has nothing to do with
the original problem.


Anyway I believe  this bug report should be closed before more people spend
time looking at C++ references for this.


[Bug c/43384] [4.3/4.4/4.5/4.6 Regression] ICE: Segmentation fault with invalid K&R-like code

2010-10-31 Thread simartin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43384

Simon Martin  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||simartin at gcc dot gnu.org
  Known to work||
  Known to fail||

--- Comment #5 from Simon Martin  2010-10-31 
07:56:47 UTC ---
Patch proposed here:
  http://gcc.gnu.org/ml/gcc-patches/2010-10/msg02657.html


[Bug c++/46246] [C++0x] Move constructor required when passing a temporary by copy, but not actually used

2010-10-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46246

Paolo Carlini  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #3 from Paolo Carlini  2010-10-31 
10:00:51 UTC ---
Let's add Jason in CC..


[Bug c++/29571] [4.3/4.4/4.5/4.6 regression] ICE with invalid static const member

2010-10-31 Thread simartin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29571

Simon Martin  changed:

   What|Removed |Added

 CC||simartin at gcc dot gnu.org
  Known to fail||

--- Comment #11 from Simon Martin  2010-10-31 
10:04:43 UTC ---
The ICE does not exist anymore at least in 4.6.


[Bug c++/46070] New: [C++0x] ill-formed use of decltype and auto causes segfault

2010-10-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46070

   Summary: [C++0x] ill-formed use of decltype and auto causes
segfault
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: enniobarb...@alice.it


Paolo Carlini  changed:

   What|Removed |Added

Summary|ill-formed use of decltype  |[C++0x] ill-formed use of
   |and auto (c++0x) causes |decltype and auto causes
   |segfault|segfault

Hi all,

The attached code causes a segfault in gcc 4.5.1 (Debian 4.5.1-9), maybe an
infinite recursion of decltype?

my system is a debian testing (kernel 2-6.32-5-amd64)

gcc configuration options:

Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.5.1-9'
--with-bugurl=file:///usr/share/doc/gcc-4.5/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.5 --enable-shared --enable-multiarch
--enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.5 --libdir=/usr/lib --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-plugin --enable-gold --with-plugin-ld=ld.gold --enable-objc-gc
--with-arch-32=i586 --with-tune=generic --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu  
Thread model: posix 
gcc version 4.5.1 (Debian 4.5.1-9)   

command line and output:
gcc-4.5 -std=c++0x bug.cpp  
gcc-4.5: Internal error: Segmentation fault (program cc1plus)   
Please submit a full bug report.
See  for instructions.

Ennio


[Bug c++/46070] [C++0x] ill-formed use of decltype and auto causes segfault

2010-10-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46070

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #1 from Paolo Carlini  2010-10-31 
10:09:46 UTC ---
PR46071 has a testcase


[Bug c++/46056] [C++0x] range-based for loop does not destruct iterators

2010-10-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46056

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #10 from Paolo Carlini  2010-10-31 
10:10:34 UTC ---
So this is fixed.


[Bug c++/46056] [C++0x] range-based for loop does not destruct iterators

2010-10-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46056

Paolo Carlini  changed:

   What|Removed |Added

   Target Milestone|--- |4.6.0

--- Comment #11 from Paolo Carlini  2010-10-31 
10:10:56 UTC ---
So this is fixed.


[Bug c++/43824] C++0x feature "inline namespace" enabled under -std=c++98; no warnings

2010-10-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43824

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #7 from Paolo Carlini  2010-10-31 
10:13:30 UTC ---
I understand this is fixed.


[Bug c++/45399] [C++0x] Warning for \0 in raw strings

2010-10-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45399

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2010.10.31 10:14:41
Summary|Warning for \0 in C++0x raw |[C++0x] Warning for \0 in
   |strings |raw strings
 Ever Confirmed|0   |1

--- Comment #1 from Paolo Carlini  2010-10-31 
10:14:41 UTC ---
Please provide a self-contained reproducer, thanks.


[Bug rtl-optimization/46248] New: 4.6 regression: crash+infinite recursion in combine

2010-10-31 Thread astrange at ithinksw dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46248

   Summary: 4.6 regression: crash+infinite recursion in combine
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: astra...@ithinksw.com


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

gcc r166084 crashes compiling ffmpeg libpostproc on x86-64-apple-darwin10.

Minimized-ish source attached.

> gcc -v
Using built-in specs.
COLLECT_GCC=/usr/local/gcc46/bin/gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc46/libexec/gcc/x86_64-apple-darwin10.4.0/4.6.0/lto-wrapper
Target: x86_64-apple-darwin10.4.0
Configured with: ../../src/gcc/configure --prefix=/usr/local/gcc46
--with-arch=native --with-tune=native --disable-nls --with-gmp=/sw
--disable-bootstrap --enable-languages=c,c++,lto,objc,obj-c++
Thread model: posix
gcc version 4.6.0 20101030 (experimental) (GCC) 

> gcc -O3 -S postprocess.i 
gcc: internal compiler error: Segmentation fault (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Backtrace:

#0  0x00010031fc34 in if_then_else_cond (x=0x1425e14b0,
ptrue=0x7fff5f400078, pfalse=0x7fff5f400068) at
../../../src/gcc/gcc/combine.c:8471
#1  0x00010031fd82 in if_then_else_cond (x=0x1425e1498,
ptrue=0x7fff5f400118, pfalse=0x7fff5f400108) at
../../../src/gcc/gcc/combine.c:8507
#2  0x00010031fd82 in if_then_else_cond (x=0x1425e14b0,
ptrue=0x7fff5f4001b8, pfalse=0x7fff5f4001a8) at
../../../src/gcc/gcc/combine.c:8507
#3  0x00010031fd82 in if_then_else_cond (x=0x1425e1498,
ptrue=0x7fff5f400258, pfalse=0x7fff5f400248) at
../../../src/gcc/gcc/combine.c:8507
#4  0x00010031fd82 in if_then_else_cond (x=0x1425e14b0,
ptrue=0x7fff5f4002f8, pfalse=0x7fff5f4002e8) at
../../../src/gcc/gcc/combine.c:8507
#5  0x00010031fd82 in if_then_else_cond (x=0x1425e1498,
ptrue=0x7fff5f400398, pfalse=0x7fff5f400388) at
../../../src/gcc/gcc/combine.c:8507
#6  0x00010031fd82 in if_then_else_cond (x=0x1425e14b0,
ptrue=0x7fff5f400438, pfalse=0x7fff5f400428) at
../../../src/gcc/gcc/combine.c:8507
...


[Bug c++/32402] Error while allocating array of pointers to objects of a pure virtual class

2010-10-31 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32402

--- Comment #11 from Jonathan Wakely  2010-10-31 
11:31:01 UTC ---
(In reply to comment #10)
> Ok, I've read the bug report following a report from a friend, and after
> checking various sources I've come to the following conclusion:
> 
> new pure(*[3]) is not valid

That's not what the bug report contains though!

It's "new (pure(*[3]))" with an extra set of parentheses around the type, so
according to the grammar "pure(*[3])" must be parsed as a type-id, there is no
initializer

> When parsed, "new pure(*[3])" is parsed as "new instance of class pure with
> parameter *[3]".

Right, and it's not accepted, see comment 5:

> - "list = new pure(*[3]);" => does not compile

But that's a different case to "new (pure(*[3]))" which is what this PR is
about.

> Anyway I see no logical reason why one would want to put part of its 
> allocation
> into parenthesis.
> 
> "new pure*[3]" should be perfectly acceptable, is easier to read, and is
> accepted by GCC without problems.


That's beside the point, if the grammar is valid then it should be accepted.


> Jonathan Wakely's example with decltype() is non related as decltype() is a 
> new
> compiler keyword, which is valid in this context, but has nothing to do with
> the original problem.

It demonstrates that GCC is happy to allocate an array of pure* using different
syntax, and that the syntax works for declaring an automatic variable.

> Anyway I believe  this bug report should be closed before more people spend
> time looking at C++ references for this.

I disagree, it's a bug, and the code is accepted by other compilers.


[Bug c++/32402] Error while allocating array of pointers to objects of a pure virtual class

2010-10-31 Thread gcc at waisse dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32402

--- Comment #12 from William Waisse  2010-10-31 11:59:13 
UTC ---
 I m no more working for the company that was trying to port this code to
linux/GCC 3 YEARS AGO . They finally abandonned the idea to get their
professional application working on GCC/Linux.

 I m sure this IS a bug , and I cant understand why this (documented) bug is
still new 3 years later.

 I m not sure this is ok with C++ grammar or semantic ( but I think it is ), I
m just sure this is a good thing to give microsoft and concurrent compilers
more customers who will not have the choice to move to linux/gcc.

 Even if its not a bug, gcc should provide an "official" workaround and argue
on WHY this is not possible in gcc, while available without any problem with
most other compilers .

 Thanks Jonathan Wakely ( comment #9 ) , posting a workaround IS relevant, and
useful for the next one hitting this bug.


[Bug c++/46246] [C++0x] Move constructor required when passing a temporary by copy, but not actually used

2010-10-31 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46246

--- Comment #4 from Jonathan Wakely  2010-10-31 
12:05:00 UTC ---
Copy elision is an optimisation allowed by the standard, but not mandated.

-fno-elide-constructors to disable it, then you should see the move constructor
called for the second test case.

The relevant constructor must be accessible and callable even if it is elided.


[Bug c++/32402] Error while allocating array of pointers to objects of a pure virtual class

2010-10-31 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32402

--- Comment #13 from Jonathan Wakely  2010-10-31 
12:42:00 UTC ---
(In reply to comment #12)
> 
>  I m sure this IS a bug , and I cant understand why this (documented) bug is
> still new 3 years later.

It's a bug, and should be fixed, but it's not critical and  workaround is
available.

>  I m not sure this is ok with C++ grammar or semantic ( but I think it is ), I
> m just sure this is a good thing to give microsoft and concurrent compilers
> more customers who will not have the choice to move to linux/gcc.

No need to exaggerate - simpler syntax can be used and the code will compile -
this bug should not prevent anyone using GCC, claiming it does is silly.

>  Even if its not a bug, gcc should provide an "official" workaround and argue
> on WHY this is not possible in gcc, while available without any problem with
> most other compilers .

There's a workaround in comment 5, it's been there for 3 years.


[Bug c++/46246] [C++0x] Move constructor required when passing a temporary by copy, but not actually used

2010-10-31 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46246

--- Comment #5 from Paolo Carlini  2010-10-31 
13:28:14 UTC ---
Makes sense, of course (I'm not used to private or protected deleted members).
Thus looks like this can closed as invalid?


[Bug tree-optimization/46142] [4.6 Regression] FMA test failures

2010-10-31 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46142

--- Comment #7 from H.J. Lu  2010-10-31 14:27:41 
UTC ---
When configured with --with-cpu=atom, I got

FAIL: gcc.target/i386/fma3-builtin-2.c scan-assembler-times vfmadd...pd 1
FAIL: gcc.target/i386/fma3-builtin-2.c scan-assembler-times vfmsub...pd 1
FAIL: gcc.target/i386/fma3-builtin-2.c scan-assembler-times vfnmadd...pd 1
FAIL: gcc.target/i386/fma3-builtin-2.c scan-assembler-times vfnmsub...pd 1
FAIL: gcc.target/i386/fma4-builtin-2.c scan-assembler-times vfmaddpd 1
FAIL: gcc.target/i386/fma4-builtin-2.c scan-assembler-times vfmsubpd 1
FAIL: gcc.target/i386/fma4-builtin-2.c scan-assembler-times vfnmaddpd 1
FAIL: gcc.target/i386/fma4-builtin-2.c scan-assembler-times vfnmsubpd 1

since -mtune=atom disables double precision vectorizer.
We need to pass -mtune=generic to those 2 testcases.


[Bug testsuite/46249] New: gcc.dg/tree-ssa/ssa-ccp-32.c: dubious test

2010-10-31 Thread nikai at nikai dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46249

   Summary: gcc.dg/tree-ssa/ssa-ccp-32.c: dubious test
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ni...@nikai.net


Operator precedence must cause the below test to always pass,
my guess is this wasn't originally intended.

I hope I'm not missing the point of this test?

Best regards,
Nicolas Kaiser
---
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-32.c2010-10-29
11:08:42.713609198 +0200
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-32.c2010-10-31
15:08:01.479911011 +0100
@@ -41,7 +41,7 @@ test2 (int a)
   if (a & 0xff)
 link_error ();
   a = a - 1;
-  if (a & 0xff != 0xff)
+  if ((a & 0xff) != 0xff)
 link_error ();
   return a;
 }


[Bug c++/46246] [C++0x] Move constructor required when passing a temporary by copy, but not actually used

2010-10-31 Thread a.pignotti at sssup dot it
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46246

--- Comment #6 from Alessandro Pignotti  2010-10-31 
15:10:22 UTC ---
Please consider the first test case before declaring this bug invalid. I think
should be legal to delete the move construtor and still being able to pass
temporaries by copy.


[Bug rtl-optimization/46248] 4.6 regression: crash+infinite recursion in combine

2010-10-31 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46248

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2010.10.31 15:15:00
 CC||bernds at codesourcery dot
   ||com, hjl.tools at gmail dot
   ||com
 Ever Confirmed|0   |1

--- Comment #1 from H.J. Lu  2010-10-31 15:15:00 
UTC ---
It is caused by revision 165674:

http://gcc.gnu.org/ml/gcc-cvs/2010-10/msg00859.html


[Bug rtl-optimization/46248] [4.6 regression] crash+infinite recursion in combine

2010-10-31 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46248

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
   Target Milestone|--- |4.6.0
Summary|4.6 regression: |[4.6 regression]
   |crash+infinite recursion in |crash+infinite recursion in
   |combine |combine

--- Comment #2 from Andrew Pinski  2010-10-31 
15:27:29 UTC ---
Related to PR 46212.


[Bug rtl-optimization/46212] [4.6 regression] segfault in reg_nonzero_bits_for_combine

2010-10-31 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46212

H.J. Lu  changed:

   What|Removed |Added

 CC||bernds at gcc dot gnu.org

--- Comment #5 from H.J. Lu  2010-10-31 15:49:57 
UTC ---
It is caused by revision 165674:

http://gcc.gnu.org/ml/gcc-cvs/2010-10/msg00859.html


[Bug target/46250] New: ICE: in extract_insn, at recog.c:2110 (unrecognizable insn) with -fPIC -mcmodel=large and __thread variable

2010-10-31 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46250

   Summary: ICE: in extract_insn, at recog.c:2110 (unrecognizable
insn) with -fPIC -mcmodel=large and __thread variable
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz


- testcase.c -
__thread int i;

void foo (void)
{
  i = 0;
}
--

Compiler output:
$ gcc -fPIC -mcmodel=large testcase.c
testcase.c: In function 'foo':
testcase.c:6:1: error: unrecognizable insn:
(call_insn/u 5 4 6 3 (parallel [
(set (reg:DI 0 ax)
(call:DI (mem:QI (symbol_ref:DI ("__tls_get_addr")) [0 S1 A8])
(const_int 0 [0])))
(unspec:DI [
(symbol_ref:DI ("i") [flags 0x10] )
] UNSPEC_TLS_GD)
]) testcase.c:5 -1
 (expr_list:REG_EH_REGION (const_int -2147483648 [0x8000])
(nil))
(nil))
testcase.c:6:1: internal compiler error: in extract_insn, at recog.c:2110
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Compiler output (4.2.4):
$ gcc-4.2.4 -fPIC -mcmodel=large testcase.c
testcase.c:1: sorry, unimplemented: code model large not supported in PIC mode
testcase.c:1: error: code model 'large' not supported in the 64 bit mode

Tested revisions:
r166105 - crash
4.5.1, 4.4.5, 4.3.5 - crash
4.2.4 - unimplemented


[Bug target/46251] New: ICE: in expand_expr_real_2, at expr.c:7276 with -funsafe-math-optimizations -mbionic and __builtin_sincosl()

2010-10-31 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46251

   Summary: ICE: in expand_expr_real_2, at expr.c:7276 with
-funsafe-math-optimizations -mbionic and
__builtin_sincosl()
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz


- testcase.c -
void foo (long double *x)
{
  __builtin_sincosl (*x, x, x);
}
--

Compiler output:
$ gcc -funsafe-math-optimizations -mbionic testcase.c
testcase.c: In function 'foo':
testcase.c:4:21: internal compiler error: in expand_expr_real_2, at expr.c:7276
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Tested revisions:
r166105 - crash
r165699 - crash
r163636 - OK
r161659 - OK
4.5 r165781 - doesn't know -mbionic


[Bug debug/46252] New: [4.6 Regression] -fcompare-debug failure (length) with -O -frerun-cse-after-loop -fno-tree-loop-optimize -funroll-loops

2010-10-31 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46252

   Summary: [4.6 Regression] -fcompare-debug failure (length) with
-O -frerun-cse-after-loop -fno-tree-loop-optimize
-funroll-loops
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz


Created attachment 22211
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22211
reduced testcase

Compiler output:
$ gcc -O -frerun-cse-after-loop -fno-tree-loop-optimize -funroll-loops
-fcompare-debug pr46252.c 
gcc: error: pr46252.c: -fcompare-debug failure (length)

Tested revisions:
r166105 - fail
r161659 - fail
r159696 - OK
4.5 r165781 - OK


[Bug target/46253] New: ICE: in move_or_delete_vzeroupper_2, at config/i386/i386.c:252 with -g and __builtin_ia32_vzeroupper()

2010-10-31 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46253

   Summary: ICE: in move_or_delete_vzeroupper_2, at
config/i386/i386.c:252 with -g and
__builtin_ia32_vzeroupper()
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz


Created attachment 22212
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22212
reduced testcase

Compiler output:
$ gcc -O -g -mf16c pr46253.c 
pr46253.c: In function 'foo':
pr46253.c:10:1: internal compiler error: in move_or_delete_vzeroupper_2, at
config/i386/i386.c:252
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


[Bug target/46254] New: ICE: in find_reloads, at reload.c:3806 (unable to generate reloads) with -fPIC -mcmodel={medium|large} and __sync_val_compare_and_swap

2010-10-31 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46254

   Summary: ICE: in find_reloads, at reload.c:3806 (unable to
generate reloads) with -fPIC -mcmodel={medium|large}
and __sync_val_compare_and_swap
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz


- testcase.c -
typedef int int128_t __attribute__ ((mode (TI)));
int128_t i;
void foo ()
{
  __sync_val_compare_and_swap (&i, i, i);
}
--

Compiler output - 4.6:
$ gcc -mcx16 -fPIC -mcmodel=large testcase.c
testcase.c: In function 'foo':
testcase.c:6:1: error: unable to generate reloads for:
(insn 17 16 20 2 (parallel [
(set (reg:TI 0 ax [69])
(mem/v:TI (reg/f:DI 37 r8 [68]) [-1 S16 A128]))
(set (mem/v:TI (reg/f:DI 37 r8 [68]) [-1 S16 A128])
(unspec_volatile:TI [
(mem/v:TI (reg/f:DI 37 r8 [68]) [-1 S16 A128])
(reg:TI 0 ax [orig:62 i.3 ] [62])
(reg:DI 70)
(reg:DI 2 cx [71])
] UNSPECV_CMPXCHG))
(set (reg:CCZ 17 flags)
(compare:CCZ (unspec_volatile:TI [
(mem/v:TI (reg/f:DI 37 r8 [68]) [-1 S16 A128])
(reg:TI 0 ax [orig:62 i.3 ] [62])
(reg:DI 70)
(reg:DI 2 cx [71])
] UNSPECV_CMPXCHG)
(reg:TI 0 ax [orig:62 i.3 ] [62])))
]) testcase.c:5 2083 {sync_double_compare_and_swapti}
 (expr_list:REG_DEAD (reg:DI 2 cx [71])
(expr_list:REG_DEAD (reg:DI 70)
(expr_list:REG_DEAD (reg/f:DI 37 r8 [68])
(expr_list:REG_DEAD (reg:TI 0 ax [orig:62 i.3 ] [62])
(expr_list:REG_UNUSED (reg:TI 0 ax [69])
(expr_list:REG_UNUSED (reg:CCZ 17 flags)
(nil
testcase.c:6:1: internal compiler error: in find_reloads, at reload.c:3806
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Compiler output - 4.5:
$ gcc -mcx16 -fPIC -mcmodel=large testcase.c
testcase.c: In function 'foo':
testcase.c:6:1: error: unable to find a register to spill in class 'BREG'
testcase.c:6:1: error: this is the insn:
(insn 17 16 20 2 testcase.c:5 (parallel [
(set (reg:TI 0 ax [68])
(mem/v:TI (reg/f:DI 37 r8 [67]) [-1 S16 A0]))
(set (mem/v:TI (reg/f:DI 37 r8 [67]) [-1 S16 A0])
(unspec_volatile:TI [
(mem/v:TI (reg/f:DI 37 r8 [67]) [-1 S16 A0])
(reg:TI 0 ax [orig:61 i.3 ] [61])
(reg:DI 69)
(reg:DI 2 cx [70])
] 10))
(set (reg:CCZ 17 flags)
(compare:CCZ (unspec_volatile:TI [
(mem/v:TI (reg/f:DI 37 r8 [67]) [-1 S16 A0])
(reg:TI 0 ax [orig:61 i.3 ] [61])
(reg:DI 69)
(reg:DI 2 cx [70])
] 10)
(reg:TI 0 ax [orig:61 i.3 ] [61])))
]) 2050 {sync_double_compare_and_swapti} (expr_list:REG_DEAD (reg:DI 2
cx [70])
(expr_list:REG_DEAD (reg:DI 69)
(expr_list:REG_DEAD (reg/f:DI 37 r8 [67])
(expr_list:REG_DEAD (reg:TI 0 ax [orig:61 i.3 ] [61])
(expr_list:REG_UNUSED (reg:TI 0 ax [68])
(expr_list:REG_UNUSED (reg:CCZ 17 flags)
(nil
testcase.c:6:1: internal compiler error: in spill_failure, at reload1.c:2157
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Compiler output - 4.4:
$ gcc -mcx16 -fPIC -mcmodel=large testcase.c
testcase.c: In function 'foo':
testcase.c:6: error: unable to find a register to spill in class 'BREG'
testcase.c:6: error: this is the insn:
(insn 17 16 25 2 testcase.c:5 (parallel [
(set (reg:TI 0 ax [68])
(mem/v:TI (reg/f:DI 37 r8 [67]) [-1 S16 A0]))
(set (mem/v:TI (reg/f:DI 37 r8 [67]) [-1 S16 A0])
(unspec_volatile:TI [
(mem/v:TI (reg/f:DI 37 r8 [67]) [-1 S16 A0])
(reg:TI 0 ax [orig:58 i.3 ] [58])
(reg:DI 69)
(reg:DI 2 cx [70])
] 10))
(clobber (reg:CC 17 flags))
]) 1993 {sync_double_compare_and_swapti} (expr_list:REG_DEAD (reg:DI 2
cx [70])
(expr_list:REG_DEAD (reg:DI 69)
(expr_list:REG_DEAD (reg/f:DI 37 r8 [67])
(expr_list:REG_DEAD (reg:TI 0 ax [o

[Bug middle-end/46251] ICE: in expand_expr_real_2, at expr.c:7276 with -funsafe-math-optimizations -mbionic and __builtin_sincosl()

2010-10-31 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46251

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2010.10.31 17:47:36
 CC||rguenth at gcc dot gnu.org
  Component|target  |middle-end
   Target Milestone|--- |4.6.0
 Ever Confirmed|0   |1

--- Comment #1 from H.J. Lu  2010-10-31 17:47:36 
UTC ---
It is caused by revision 163915:

http://gcc.gnu.org/ml/gcc-cvs/2010-09/msg00207.html


[Bug tree-optimization/46142] [4.6 Regression] FMA test failures

2010-10-31 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46142

--- Comment #8 from Uros Bizjak  2010-10-31 18:00:58 
UTC ---
(In reply to comment #7)

> since -mtune=atom disables double precision vectorizer.
> We need to pass -mtune=generic to those 2 testcases.

The patch to add -mtune=generic to dg-options in preapproved.


[Bug target/46253] ICE: in move_or_delete_vzeroupper_2, at config/i386/i386.c:252 with -g and __builtin_ia32_vzeroupper()

2010-10-31 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46253

Uros Bizjak  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2010.10.31 18:04:40
 AssignedTo|unassigned at gcc dot   |ubizjak at gmail dot com
   |gnu.org |
   Target Milestone|--- |4.6.0
 Ever Confirmed|0   |1

--- Comment #1 from Uros Bizjak  2010-10-31 18:04:40 
UTC ---
I will soon post a patch that recodes move_or_delete_vzeroupper_2 loop.

The patch also fixes this testcase.


[Bug target/46253] ICE: in move_or_delete_vzeroupper_2, at config/i386/i386.c:252 with -g and __builtin_ia32_vzeroupper()

2010-10-31 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46253

--- Comment #2 from H.J. Lu  2010-10-31 18:09:16 
UTC ---
Created attachment 22213
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22213
An experimental patch


[Bug tree-optimization/46142] [4.6 Regression] FMA test failures

2010-10-31 Thread hjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46142

--- Comment #9 from hjl at gcc dot gnu.org  2010-10-31 
19:07:13 UTC ---
Author: hjl
Date: Sun Oct 31 19:07:09 2010
New Revision: 166113

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166113
Log:
Add -mtune=generic to fma3-builtin-2.c/fma4-builtin-2.c.

2010-10-31  H.J. Lu  

PR target/46142
* gcc.target/i386/fma3-builtin-2.c: Add -mtune=generic.
* gcc.target/i386/fma4-builtin-2.c: Likewise.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/fma3-builtin-2.c
trunk/gcc/testsuite/gcc.target/i386/fma4-builtin-2.c


[Bug debug/46255] New: [4.6 Regression] -fcompare-debug failure with -fprofile-generate

2010-10-31 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46255

   Summary: [4.6 Regression] -fcompare-debug failure with
-fprofile-generate
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz


Created attachment 22214
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22214
reduced testcase

Compiler output:
$ gcc -O -fprofile-generate -fcompare-debug pr46254.c 
gcc: error: pr46254.c: -fcompare-debug failure

Tested revisions:
r166105 - fail
r165699 - fail
r163636 - OK
4.5 r165781 - OK


[Bug ada/46256] New: Combination of protected type, interfaces and unchecked deallocation causes the compiler to crash.

2010-10-31 Thread prog at msobczak dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46256

   Summary: Combination of protected type, interfaces and
unchecked deallocation causes the compiler to crash.
   Product: gcc
   Version: 4.3.4
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: p...@msobczak.com


with Ada.Unchecked_Deallocation;

procedure Test is

   package P is
  type My_Interface is limited interface;
  procedure Do_Something (X : in out My_Interface) is abstract;
   end P;

   protected type My_Protected is new P.My_Interface with
  overriding
  procedure Do_Something;
   end My_Protected;

   protected body My_Protected is
  overriding
  procedure Do_Something is
  begin
 null;
  end Do_Something;
   end My_Protected;

   type My_Protected_Ptr is access My_Protected;

   procedure Free is new Ada.Unchecked_Deallocation
 (Object => My_Protected, Name => My_Protected_Ptr);

   Ptr : My_Protected_Ptr;

begin
   --   here come dragons:
   --Free (Ptr);
   null;
end Test;

Uncommenting the indicated line causes all known compiler versions to crash
with internal error.


[Bug debug/46252] [4.6 Regression] -fcompare-debug failure (length) with -O -frerun-cse-after-loop -fno-tree-loop-optimize -funroll-loops

2010-10-31 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46252

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2010.10.31 21:35:31
 CC||ebotcazou at gcc dot
   ||gnu.org
   Target Milestone|--- |4.6.0
 Ever Confirmed|0   |1

--- Comment #1 from H.J. Lu  2010-10-31 21:35:31 
UTC ---
It is caused by revision 162618:

http://gcc.gnu.org/ml/gcc-cvs/2010-07/msg00972.html


[Bug rtl-optimization/46257] New: [Meta] [4.6 Regression] ifcvt/crossjump failure

2010-10-31 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46257

   Summary: [Meta] [4.6 Regression] ifcvt/crossjump failure
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: hjl.to...@gmail.com
CC: ja...@gcc.gnu.org, ja...@redhat.com, r...@gcc.gnu.org,
ber...@codesourcery.com, jgu...@gmail.com
Blocks: 45865,46018,46238


Revision 164552:

http://gcc.gnu.org/ml/gcc-cvs/2010-09/msg00849.html

caused many failures.


[Bug debug/46255] [4.6 Regression] -fcompare-debug failure with -fprofile-generate

2010-10-31 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46255

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2010.10.31 23:02:06
 CC||rguenth at gcc dot gnu.org
   Target Milestone|--- |4.6.0
 Ever Confirmed|0   |1

--- Comment #1 from H.J. Lu  2010-10-31 23:02:06 
UTC ---
It is caused by revision 164986:

http://gcc.gnu.org/ml/gcc-cvs/2010-10/msg00168.html


[Bug debug/46258] New: gcc.dg/tree-ssa/pr23820.c: -fcompare-debug failure with -O3 -ffloat-store

2010-10-31 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46258

   Summary: gcc.dg/tree-ssa/pr23820.c: -fcompare-debug failure
with -O3 -ffloat-store
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zso...@seznam.cz


Compiler output:
$ gcc -O3 -ffloat-store -fcompare-debug pr23820.i 
gcc: error: pr23820.i: -fcompare-debug failure

I wasn't able to reduce the testcase further.

Tested revisions:
r166105 - fail
r153685 - fail
r158095 - fail
r159696 - fail
4.5 r165781 - fail


[Bug web/45803] bugzilla: Invalid HTML

2010-10-31 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45803

Zdenek Sojka  changed:

   What|Removed |Added

 CC||zsojka at seznam dot cz

--- Comment #1 from Zdenek Sojka  2010-10-31 23:59:11 
UTC ---
It seems Firefox shows the pages "as expected", but Chromium doesn't. So there
are "-->" visible at some places and items expected to be hidden are visible
(like the OS dropdown at http://gcc.gnu.org/bugzilla/enter_bug.cgi?product=gcc
)


[Bug c++/46246] [C++0x] Move constructor required when passing a temporary by copy, but not actually used

2010-10-31 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46246

--- Comment #7 from Jonathan Wakely  2010-11-01 
00:15:33 UTC ---
No, a deleted function can still be selected by overload resolution. Defining a
move constructor as deleted does not have the semantics you want.

In the current draft, n3126, a user-declared copy constructor suppresses the
implicit declaration of a move constructor.  So all you need to do to make a
class copyable but not movable is declare the copy constructor.  Don't declare
a move constructor, definitely don't define it as deleted.


$ cat foo.cpp
#include 

using namespace std;

class Bar
{
public:
Bar()
{
cout << "default bar" << endl;
}
Bar(const Bar& r)
{
cout << "copy bar" << endl;
}
};

void foo(Bar p)
{
cout << "foo called" << endl;
}

int main()
{
foo(Bar());
return 0;
}
$ g++ -std=c++0x foo.cpp -fno-elide-constructors
$ ./a.out
default bar
copy bar
foo called


[Bug libstdc++/36022] stl templates exported as weak symbols though visibility hidden is used

2010-10-31 Thread gcc at dixie dot net.nz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36022

--- Comment #6 from Andrew Dixie  2010-11-01 01:32:39 
UTC ---
Created attachment 22215
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22215
add key functions to classes in stdexcept

FWIW.  This patch an top of the patch from Benjamin Kosnik against gcc-4.4.5
gets:

=== libstdc++ Summary ===

# of expected passes5861
# of unexpected failures1
# of expected failures  80
# of unsupported tests  338

The one failure is abi_check which is due to the new destructor symbols not
being versioned properly.

With the patch, the virtual tables and typeinfo for standard exceptions are
stored once in libstdc++.so, rather than having weak/comdat definitions
duplicated in every object file.
This seems beneficial in it's own right.


[Bug testsuite/20003] libmudflap.cth timeouts too short

2010-10-31 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20003

--- Comment #6 from Jason Merrill  2010-11-01 
02:04:25 UTC ---
Author: jason
Date: Mon Nov  1 02:04:20 2010
New Revision: 166121

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166121
Log:
PR testsuite/20003
* testsuite/libmudflap.cth/pass40-frag.c: Increase timeout to 30.

Modified:
trunk/libmudflap/ChangeLog
trunk/libmudflap/testsuite/libmudflap.cth/pass40-frag.c


[Bug target/46030] registers trashed with -Os

2010-10-31 Thread amodra at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46030

--- Comment #1 from Alan Modra  2010-11-01 03:24:23 
UTC ---
Author: amodra
Date: Mon Nov  1 03:24:20 2010
New Revision: 166125

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166125
Log:
PR target/46030
* config/rs6000/rs6000.c (struct rs6000_stack): Add reload_completed
and savres_strategy.
(stack_info): New file scope var.
(rs6000_init_machine_status): Init stack_info.
(SAVRES_INLINE_FPRS, SAVRES_INLINE_GPRS,
SAVRES_NOINLINE_GPRS_SAVES_LR, SAVRES_NOINLINE_FPRS_SAVES_LR,
SAVRES_NOINLINE_FPRS_DOESNT_RESTORE_LR): Replace with..
(SAVE_INLINE_FPRS, SAVE_INLINE_GPRS, REST_INLINE_FPRS, REST_INLINE_GPRS,
SAVE_NOINLINE_GPRS_SAVES_LR, SAVE_NOINLINE_FPRS_SAVES_LR
REST_NOINLINE_FPRS_DOESNT_RESTORE_LR): ..this.  Update all refs.
(rs6000_savres_strategy): Rewrite.
(rs6000_stack_info): Use "stack_info" in place of local "info".
Return cached stack info when reload_completed unless ENABLE_CHECKING
in which case confirm newly calculated stack info matches old info.
Delay calculation of lr_save_p, set it for out of line gp save/restore
as well as fp.  Call rs6000_savres_strategy from here..
(rs6000_emit_prologue, rs6000_emit_epilogue): ..rather than here.
(rs6000_output_function_prologue): Use info->savres_strategy to
determine whether fp save/restore externs need to be emitted.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.c