[Bug tree-optimization/50995] [4.7 regression] ICE in ipa-inline.c:1413

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

Richard Guenther  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org
   Target Milestone|--- |4.7.0

--- Comment #1 from Richard Guenther  2011-11-05 
08:42:13 UTC ---
Another one


[Bug target/18649] terminate called after throwing - IOT/Abort trap (core dumped)

2011-11-05 Thread bucreev_1 at mail dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18649

bucreev_1 at mail dot ru changed:

   What|Removed |Added

 CC||bucreev_1 at mail dot ru

--- Comment #6 from bucreev_1 at mail dot ru 2011-11-05 09:21:35 UTC ---
This example (Allen Skees 2004-11-24 15:48:41 UTC) also does not work correctly
when using gcc version 4.5.2.

D:\MinGW\bin>gcc -v
Using built-in specs.
COLLECT_GCC=D:\MinGW\bin\gcc.EXE
COLLECT_LTO_WRAPPER=d:/mingw/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.2/configure
--enable-languages=c,c++,ada,fortran,obj
c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared
--enable-libgo
mp --disable-win32-registry --enable-libstdcxx-debug
--enable-version-specific-r
untime-libs --disable-werror --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.2 (GCC)


[Bug target/50038] redundant zero extensions

2011-11-05 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50038

Eric Botcazou  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-11-05
 CC||ebotcazou at gcc dot
   ||gnu.org
 Ever Confirmed|0   |1

--- Comment #7 from Eric Botcazou  2011-11-05 
10:55:38 UTC ---
The combiner should probably do something in this local case.


[Bug middle-end/50823] [4.7 Regression] ICE in inline_small_functions, at ipa-inline.c:1407

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

Richard Guenther  changed:

   What|Removed |Added

 CC||jojelino at gmail dot com

--- Comment #9 from Richard Guenther  2011-11-05 
11:50:27 UTC ---
*** Bug 50995 has been marked as a duplicate of this bug. ***


[Bug tree-optimization/50995] [4.7 regression] ICE in ipa-inline.c:1413

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

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE

--- Comment #2 from Richard Guenther  2011-11-05 
11:50:27 UTC ---
dup

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


[Bug rtl-optimization/50904] [4.7 regression] pessimization when -fno-protect-parens is enabled by -Ofast

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

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P2
   Target Milestone|--- |4.7.0

--- Comment #9 from Richard Guenther  2011-11-05 
11:52:55 UTC ---
Fortran enabling -fno-protect-parens would be the regression, the RTL opt
problem likely isn't.  Keeping at P2 for now.


[Bug debug/50983] [4.7 Regression] incorrect DW_LNS_negate_stmt

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

Richard Guenther  changed:

   What|Removed |Added

   Target Milestone|--- |4.7.0

--- Comment #1 from Richard Guenther  2011-11-05 
11:54:24 UTC ---
Patches should be posted to gcc-patc...@gcc.gnu.org


[Bug c++/50896] [4.7 Regression] FAIL: g++.dg/lto/20100302 cp_lto_20100302_0.o-cp_lto_20100302_1.o link, -flto -fabi-version=2 (internal compiler error)

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

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P1
Summary|FAIL: [4.7 Regression]  |[4.7 Regression] FAIL:
   |g++.dg/lto/20100302 |g++.dg/lto/20100302
   |cp_lto_20100302_0.o-cp_lto_ |cp_lto_20100302_0.o-cp_lto_
   |20100302_1.o link, -flto|20100302_1.o link, -flto
   |-fabi-version=2 (internal   |-fabi-version=2 (internal
   |compiler error) |compiler error)


[Bug middle-end/50907] [4.7 Regression] EDGE_CROSSING incorrectly set across same section with -freorder-blocks-and-partition -fPIC -fprofile-use

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

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P1


[Bug target/50911] [4.7 regression] assertion failure in expand_vec_perm_interleave2 with -msse

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

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P1


[Bug fortran/50923] [4.4/4.5/4.6/4.7 Regression] No warning if function return value is not set

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

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-11-05
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2011-11-05 
12:11:18 UTC ---
The fortran frontend emits

f ()
{

}

in this the middle-end does not warn because TREE_NO_WARNING is set
on the function decl by the frontend:

  if (result == NULL_TREE)
{
  /* TODO: move to the appropriate place in resolve.c.  */
  if (warn_return_type && !sym->attr.referenced && sym == sym->result)
gfc_warning ("Return value of function '%s' at %L not set",
 sym->name, &sym->declared_at);

  TREE_NO_WARNING(sym->backend_decl) = 1;


[Bug fortran/50923] [4.4/4.5/4.6/4.7 Regression] No warning if function return value is not set

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

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P4


[Bug other/50925] [4.7 Regression][avr] ICE at spill_failure, at reload1.c:2118

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

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P4


[Bug fortran/50981] [4.4/4.5/4.6/4.7 Regression] Wrong-code for scalarizing ELEMENTAL call with absent OPTIONAL argument

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

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P4


[Bug bootstrap/50982] gthr reorganization breakage

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

--- Comment #24 from Jonathan Wakely  2011-11-05 
12:23:45 UTC ---
(In reply to comment #23)
> I suspect that libstdc++ is having problems because pthread_once_t is a struct
> in AIX.  libstdc++ should not be written to assume it is a scalar.

Ah, that's easily fixed, std::once_flag should use a non-static data member
initializer, does this patch help:

Index: include/std/mutex
===
--- include/std/mutex   (revision 180447)
+++ include/std/mutex   (working copy)
@@ -760,11 +760,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   {
   private:
 typedef __gthread_once_t __native_type;
-__native_type  _M_once;
+__native_type  _M_once = __GTHREAD_ONCE_INIT;

   public:
 /// Constructor
-constexpr once_flag() noexcept : _M_once(__GTHREAD_ONCE_INIT) { }
+constexpr once_flag() noexcept = default;

 /// Deleted copy constructor
 once_flag(const once_flag&) = delete;


[Bug bootstrap/50982] gthr reorganization breakage

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

Jonathan Wakely  changed:

   What|Removed |Added

 CC||redi at gcc dot gnu.org

--- Comment #25 from Jonathan Wakely  2011-11-05 
12:29:50 UTC ---
I'm going to apply that patch anyway, I should have done it as part of PR 49894
- if it solves this problem that's an added bonus


[Bug middle-end/37060] [4.4/4.5/4.6 Regression] Bogus __builtin___memcpy_chk overflow warning

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

Richard Guenther  changed:

   What|Removed |Added

  Known to work||4.7.0
Summary|[4.4/4.5/4.6/4.7|[4.4/4.5/4.6 Regression]
   |regression] Bogus   |Bogus
   |__builtin___memcpy_chk  |__builtin___memcpy_chk
   |overflow warning|overflow warning
  Known to fail||4.6.2

--- Comment #15 from Richard Guenther  2011-11-05 
12:33:02 UTC ---
The bogus jump-threadings no longer occur on trunk.  Re-confirmed on the 4.6
branch.


[Bug middle-end/39976] [4.5/4.6/4.7 Regression] Big sixtrack degradation on powerpc 32/64 after revision r146817

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

Richard Guenther  changed:

   What|Removed |Added

 Status|NEW |WAITING

--- Comment #35 from Richard Guenther  2011-11-05 
12:37:17 UTC ---
Asking for re-confirmation again.


[Bug bootstrap/50982] gthr reorganization breakage

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

--- Comment #26 from Jonathan Wakely  2011-11-05 
12:52:51 UTC ---
(In reply to comment #7)
> /tmp/2003/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/include/mutex: In
> func
> tion 'void std::call_once(std::once_flag&, _Callable&&, _Args&& ...)':
> /tmp/2003/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/include/mutex:818:64:
>  
> error: invalid conversion from 'void (*)(...)' to 'void (*)()' [-fpermissive]
> make[9]: *** [atomic.lo] Error 1

I'm not sure what is happening here, the relevant lines are:

  extern "C" void __once_proxy();

  int __e = __gthread_once(&(__once._M_once), &__once_proxy);

The function pointer is of type void(*)() so I don't know why the error
mentions a varargs function.


[Bug rtl-optimization/50448] [4.5/4.6/4.7 Regression] Missed optimization accessing struct component with integer address

2011-11-05 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50448

--- Comment #6 from Georg-Johann Lay  2011-11-05 
13:08:57 UTC ---
Author: gjl
Date: Sat Nov  5 13:08:54 2011
New Revision: 181011

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181011
Log:
PR rtl-optimization/50448
* cprop.c (try_replace_reg): Also try to replace uses of FROM that
appear in SET_DEST.


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


[Bug libstdc++/49894] [C++0x] Uniform initialization in constructor

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

--- Comment #12 from Jonathan Wakely  2011-11-05 
13:33:38 UTC ---
Author: redi
Date: Sat Nov  5 13:33:29 2011
New Revision: 181013

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181013
Log:
PR libstdc++/49894
PR bootstrap/50982
* include/std/mutex (once_flag): Use NSDMI.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/mutex


[Bug bootstrap/50982] gthr reorganization breakage

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

--- Comment #27 from Jonathan Wakely  2011-11-05 
13:33:38 UTC ---
Author: redi
Date: Sat Nov  5 13:33:29 2011
New Revision: 181013

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181013
Log:
PR libstdc++/49894
PR bootstrap/50982
* include/std/mutex (once_flag): Use NSDMI.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/mutex


[Bug c++/50990] vector.tcc:373:5: internal compiler error:

2011-11-05 Thread mathieu.malaterre at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50990

Mathieu Malaterre  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||INVALID

--- Comment #3 from Mathieu Malaterre  
2011-11-05 13:41:05 UTC ---
Quoting one of the sparc64 admin:

...
The problem is not GCC, but rather the machine currently used for the
sparc64 build daemon, which is slowly dying (likely a memory issue).
Most of the ICE appearing when build packages are due to the build
daemon.

Concerning vxl, I have built it without any problem in another machine
and uploaded it to the archive.
...

Changing status to resolved/invalid. Sorry for the noise.


[Bug bootstrap/50982] gthr reorganization breakage

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

--- Comment #28 from Jonathan Wakely  2011-11-05 
13:56:43 UTC ---
Just to be clear, as this bug report is quite misleading: once the initial
problem was fixed the change is that _GLIBCXX_HAS_GTHREADS is being set now
when it wasn't previously (for why that happens you'll need to look in the
libstdc++-v3/config.log)

That causes code to be included on AIX that was previously not used, the
failures in include/mutex are not new or caused by Rainer's changes, that code
was (apparently) never compiled on AIX previously. Everything from comment 7
onwards is due to the inclusion of code which has never been used on AIX
before.

Either the cause of the change to _GLIBCXX_HAS_GTHREADS should be reverted so
that AIX doesn't use the C++ mutex code, making the compilation errors in that
code disappear, or (I think this is the correct approach) the bug should be
recategorised as libstdc++ and assigned to me to fix the libstdc++ code so it
works on AIX.

The latter option should mean AIX will get a working C++11 threading
implementation, which presumably it previously didn't (which will mean we
should adjust the relevant parts of the testsuite to use any required flags to
run on AIX)


[Bug target/50725] [4.7 regression] -O3 -mstackrealign -march=core2 generates invalid prologue code in callee procedure

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

Mikael Pettersson  changed:

   What|Removed |Added

 CC||mikpe at it dot uu.se

--- Comment #13 from Mikael Pettersson  2011-11-05 
13:58:55 UTC ---
I see an obvious regression with gcc-4.7 compared to 4.6 on cygwin.  With 4.6.1
built natively on cygwin the code starts with:

__pei386_runtime_relocator:
LFB2:
.cfi_startproc
leal4(%esp), %ecx
.cfi_def_cfa 1, 0
andl$-16, %esp
pushl   -4(%ecx)
pushl   %ebp
movl%esp, %ebp
.cfi_escape 0x10,0x5,0x2,0x75,0
pushl   %edi
pushl   %esi
pushl   %ebx
pushl   %ecx
.cfi_escape 0xf,0x3,0x75,0x70,0x6
.cfi_escape 0x10,0x3,0x2,0x75,0x74
.cfi_escape 0x10,0x6,0x2,0x75,0x78
.cfi_escape 0x10,0x7,0x2,0x75,0x7c
subl$56, %esp
movl(%ecx), %eax
cmpl$226, 8(%eax)

that is, the parameter is on the stack just above the return address.

With gcc-4.7-20111029 built as a cross to cygwin, the code starts with:

__pei386_runtime_relocator:
LFB2:
.cfi_startproc
movl(%ecx), %eax
cmpl$226, 8(%eax)
jg  L15
ret
.p2align 4,,10
L15:
leal4(%esp), %ecx
.cfi_def_cfa 1, 0
andl$-16, %esp
pushl   -4(%ecx)
pushl   %ebp
.cfi_escape 0x10,0x5,0x2,0x75,0
movl%esp, %ebp

which is just completely bonkers.

This code looks shrink-wrapped; passing -fno-shrink-wrap changes it to:

__pei386_runtime_relocator:
LFB2:
.cfi_startproc
leal4(%esp), %ecx
.cfi_def_cfa 1, 0
andl$-16, %esp
pushl   -4(%ecx)
pushl   %ebp
.cfi_escape 0x10,0x5,0x2,0x75,0
movl%esp, %ebp
pushl   %edi
pushl   %esi
pushl   %ebx
pushl   %ecx
.cfi_escape 0xf,0x3,0x75,0x70,0x6
subl$56, %esp
.cfi_escape 0x10,0x7,0x2,0x75,0x7c
.cfi_escape 0x10,0x6,0x2,0x75,0x78
.cfi_escape 0x10,0x3,0x2,0x75,0x74
movl(%ecx), %eax
cmpl$226, 8(%eax)

which is similar to the code from gcc-4.6.1.


[Bug bootstrap/50982] gthr reorganization breakage

2011-11-05 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50982

--- Comment #29 from David Edelsohn  2011-11-05 
14:11:35 UTC ---
The patch in comment 24 solves some of the problem.  Thanks!

The error now is:

In file included from /farm/dje/src/src/libstdc++-v3/src/atomic.cc:28:0:
/tmp/2004/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/include/mutex:763:30:
error: array must be initialized with a brace-enclosed initializer
/tmp/2004/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/include/mutex:763:30:
error: too many initializers for 'std::once_flag::__native_type {aka
pthread_once_t}'
/tmp/2004/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/include/mutex: In
function 'void std::call_once(std::once_flag&, _Callable&&, _Args&& ...)':
/tmp/2004/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/include/mutex:818:64:
error: invalid conversion from 'void (*)(...)' to 'void (*)()' [-fpermissive]

On AIX pthread_once_t is a struct containing an array:

typedef struct
{
#ifdef __64BIT__
long__on_word[9];
#else
int __on_word[28];
#endif /* __64BIT__ */
}
pthread_once_t;

and the initializer is an array:

#ifdef __64BIT__
#define PTHREAD_ONCE_INIT \
{ \
0, \
0, \
0, \
0, \
0, \
_PTH_FLAGS_INIT64, \
0 \
}
#else
#define PTHREAD_ONCE_INIT \
{ \
0, \
0, \
0, \
0, \
0, \
0, \
0, \
2, \
0 \
}
#endif /* __64BIT__ */

The initializer has few words than the array because the rest are zero, but
matching the size does not solve the problem.

I also do not understand the conversion error:

extern int
pthread_once (pthread_once_t *, void (*)(void))
   ;

static inline int
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
{
  if (__gthread_active_p ())
return pthread_once (__once, __func);
  else
return -1;
}

  int __e = __gthread_once(&(__once._M_once), &__once_proxy);


I will upload the new atomic.ii

Thanks for your help.


[Bug bootstrap/50982] gthr reorganization breakage

2011-11-05 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50982

David Edelsohn  changed:

   What|Removed |Added

  Attachment #25715|0   |1
is obsolete||
  Attachment #25717|0   |1
is obsolete||
  Attachment #25722|0   |1
is obsolete||

--- Comment #30 from David Edelsohn  2011-11-05 
14:14:36 UTC ---
Created attachment 25727
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25727
rev 180821 atomic.ii from save-temps after patch from comment 24


[Bug libstdc++/50982] AIX libstdc++ GTHREADS incompatibility

2011-11-05 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50982

David Edelsohn  changed:

   What|Removed |Added

  Component|bootstrap   |libstdc++
 AssignedTo|ro at gcc dot gnu.org   |redi at gcc dot gnu.org
Summary|gthr reorganization |AIX libstdc++ GTHREADS
   |breakage|incompatibility

--- Comment #31 from David Edelsohn  2011-11-05 
14:19:48 UTC ---
Jonathan,

I agree with your recommendation in comment 28.  I have revised the description
of the bug and uploaded the current pre-processed atomic.cc after your earlier
patch.  Rainer was able to reproduce the earlier errors using the pre-processed
file on a non-AIX system; let me know if you cannot.  Let me know if you need
more information, but I think that everything should be self-contained in
atomic.ii.

Thanks, David


[Bug libstdc++/50982] AIX libstdc++ GTHREADS incompatibility

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

--- Comment #32 from Jonathan Wakely  2011-11-05 
14:29:11 UTC ---
(In reply to comment #29)
> On AIX pthread_once_t is a struct containing an array:
> 
> typedef struct
> {
> #ifdef __64BIT__
> long__on_word[9];
> #else
> int __on_word[28];
> #endif /* __64BIT__ */
> }
> pthread_once_t;
> 
> and the initializer is an array:
> 
> #ifdef __64BIT__
> #define PTHREAD_ONCE_INIT \
> { \
> 0, \
> 0, \
> 0, \
> 0, \
> 0, \
> _PTH_FLAGS_INIT64, \
> 0 \
> }
> #else
> #define PTHREAD_ONCE_INIT \
> { \
> 0, \
> 0, \
> 0, \
> 0, \
> 0, \
> 0, \
> 0, \
> 2, \
> 0 \
> }
> #endif /* __64BIT__ */
> 
> The initializer has few words than the array because the rest are zero, but
> matching the size does not solve the problem.

The initializer is missing a set of braces.

That could be fixed by changing mutex like so:

Index: include/std/mutex
===
--- include/std/mutex   (revision 181013)
+++ include/std/mutex   (working copy)
@@ -760,7 +760,7 @@
   {
   private:
 typedef __gthread_once_t __native_type;
-__native_type  _M_once = __GTHREAD_ONCE_INIT;
+__native_type  _M_once = { __GTHREAD_ONCE_INIT };

   public:
 /// Constructor

But that would be wrong for other platforms - I'll have to look into this bit,
but you could apply the patch locally for now to get past this problem.

Maybe we need to fixinclude the INIT macro to add extra braces on AIX.

> I also do not understand the conversion error:
> 
> extern int
> pthread_once (pthread_once_t *, void (*)(void))
>;
> 
> static inline int
> __gthread_once (__gthread_once_t *__once, void (*__func) (void))
> {
>   if (__gthread_active_p ())
> return pthread_once (__once, __func);
>   else
> return -1;
> }
> 
>   int __e = __gthread_once(&(__once._M_once), &__once_proxy);

I don't understand that either.


[Bug libstdc++/50982] AIX libstdc++ GTHREADS incompatibility

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

Jonathan Wakely  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #33 from Jonathan Wakely  2011-11-05 
15:39:09 UTC ---
Jason, is the compiler right to reject the NSDMI below, and can you suggest any
workaround except using fixincludes to add the missing braces around the
PTHREAD_ONCE_INIT macro for AIX?


The problematic code can be reduced to:

  typedef struct
  {
int __on_word[28];
  }
  pthread_once_t;

  #define PTHREAD_ONCE_INIT { 0, 0, 0, 0, 0, 0, 0, 2, 0 }

  pthread_once_t once = PTHREAD_ONCE_INIT;

  struct once_flag
  {
  private:
pthread_once_t _M_once = PTHREAD_ONCE_INIT;

  public:

constexpr once_flag() noexcept = default;
  };

  once_flag o;

The declaration of "once" at namespace scope only gives warning:

at.cc:9:25: warning: missing braces around initializer for ‘int [28]’
[-Wmissing-braces]

but the same construct used as a NSDMI in once_flag gives an error:

at.cc:14:30: error: array must be initialized with a brace-enclosed initializer
at.cc:14:30: error: too many initializers for ‘pthread_once_t’


[Bug libstdc++/50982] AIX libstdc++ GTHREADS incompatibility

2011-11-05 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50982

--- Comment #34 from David Edelsohn  2011-11-05 
15:51:54 UTC ---
I am trying to bootstrap with --disable-multilib to at least be able to build
GCC while we try to fix this.

Adding the braces removes the first error, but 

In file included from /farm/dje/src/src/libstdc++-v3/src/atomic.cc:28:0:
/tmp/2004/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/include/mutex: In
function 'void std::call_once(std::once_flag&, _Callable&&, _Args&& ...)':
/tmp/2004/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/include/mutex:818:64:
error: invalid conversion from 'void (*)(...)' to 'void (*)()' [-fpermissive]

remains.

Thanks! David


[Bug libstdc++/50982] AIX libstdc++ GTHREADS incompatibility

2011-11-05 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50982

--- Comment #35 from David Edelsohn  2011-11-05 
15:54:45 UTC ---
And the single set of braces appears to be an AIX header bug.  But it is not
fixed in any later AIX releases through AIX 7.1.  I suspect this will require
fixincludes magic.


[Bug target/29693] ICE while compiling gcc-3.4.3 with gcc-4.1.1

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

Mikael Pettersson  changed:

   What|Removed |Added

 CC||mikpe at it dot uu.se

--- Comment #8 from Mikael Pettersson  2011-11-05 
16:03:17 UTC ---
The bug still occurs with gcc-4.7-20111029 for arm-linux-gnueabi.

The problem is that dwarf2cfi.c:expand_builtin_init_dwarf_reg_sizes loops from
0 to FIRST_PSEUDO_REGISTER-1 assuming each value maps to a DWARF register. 
However, arm_dbx_register_number is a partial function which does
gcc_unreachable for several points in this range.  A quick check showed that
CC_REGNUM, FRAME_POINTER_REGNUM, ARG_POINTER_REGNUM, the range of Cirrus FP
regnums, and (in my config) the high VFP regnums all caused gcc_unreachable.

I think the high VFP regnums issue is a fixable bug, the Cirrus regnums could
be mapped to the unspecified vendor range, and CC_REGNUM could be mapped to
CPSR (called SPSR in aadwarf?).  I don't know what FRAME_POINTER or ARG_POINTER
should map to though, since they're presumably eliminated virtual registers.


[Bug libstdc++/50982] AIX libstdc++ GTHREADS incompatibility

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

--- Comment #36 from Jonathan Wakely  2011-11-05 
16:09:42 UTC ---
(In reply to comment #31)
> Adding the braces removes the first error, but 
> 
> In file included from /farm/dje/src/src/libstdc++-v3/src/atomic.cc:28:0:
> /tmp/2004/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/include/mutex: In
> function 'void std::call_once(std::once_flag&, _Callable&&, _Args&& ...)':
> /tmp/2004/powerpc-ibm-aix5.3.0.0/pthread/libstdc++-v3/include/mutex:818:64:
> error: invalid conversion from 'void (*)(...)' to 'void (*)()' [-fpermissive]
> 
> remains.

I can't reproduce that error.

Does this patch make any difference?

Index: include/std/mutex
===
--- include/std/mutex   (revision 181013)
+++ include/std/mutex   (working copy)
@@ -796,7 +796,7 @@
   __get_once_mutex();
 #endif

-  extern "C" void __once_proxy();
+  extern "C" void __once_proxy(void);

   /// call_once
   template


It really *shouldn't* make a difference, but it's all I can think of.


[Bug libstdc++/50982] AIX libstdc++ GTHREADS incompatibility

2011-11-05 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50982

--- Comment #37 from David Edelsohn  2011-11-05 
16:18:24 UTC ---
Yes, the patch in comment 36 appears to fix the second errorr. Thanks!  I
really appreciate the help.

I guess I need to work on fixincludes for the AIX header.


[Bug libstdc++/50982] AIX libstdc++ GTHREADS incompatibility

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

--- Comment #38 from Jonathan Wakely  2011-11-05 
16:31:36 UTC ---
Well that's *really* strange.  The declaration is a C++ function in C++ code,
the extern "C" doesn't alter that, and void f() is identical to void f(void) in
C++ (except that the latter has rightly been described as "an abomination" by
Doug McIlroy and Dennis Ritchie)

Does AIX have special rules in the C++ front end that cause an empty function
parameter list to be considered a varargs function?!


[Bug libstdc++/50982] AIX libstdc++ GTHREADS incompatibility

2011-11-05 Thread dje at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50982

--- Comment #39 from David Edelsohn  2011-11-05 
16:58:29 UTC ---
I am not aware of any AIX-specific rules.


[Bug rtl-optimization/50984] Boolean return value expression clears register too often

2011-11-05 Thread svfuerst at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50984

Steven Fuerst  changed:

   What|Removed |Added

 CC||svfuerst at gmail dot com

--- Comment #3 from Steven Fuerst  2011-11-05 
17:05:03 UTC ---
It can be done with zero clears of %eax via the magic of the lea instruction:

andl$8, %edi
andl$4, %esi
leal(%edi, %esi, 2), %eax
shr$4, %eax
ret

However, if the first condition is usually false, this method will be slower. 
On the other hand, this version can be easily manipulated to have less register
pressure.  (So it may always be better when the function is inevitably
inlined.)


[Bug c/50996] New: segfault cross-compiling for lm32

2011-11-05 Thread rubini at gnudd dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50996

 Bug #: 50996
   Summary: segfault cross-compiling for lm32
Classification: Unclassified
   Product: gcc
   Version: 4.6.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: rub...@gnudd.com


Created attachment 25728
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25728
Minimal file that causes the segfault

This may be similar to bug 50927 and maybe 46898.

The compiler segfault on an apparently simple (but ugly) newlib file.
I removed command line options from the complete command to get
the minimum failing case. I also trimmed the preprocessed file
to the minimum, thich I attach.

The original file is envz-entry.c for newlib 1.18.0 or 1.19.0.
The same segfault happens with 4.6.1 and 4.6.2

With -O1 it segfaults like with -O2 (which I got in my log file).

spusa$ /data/spusa/lm32/build-05-17-10/./gcc/xgcc
-B/data/spusa/lm32/build-05-17-10/./gcc/   -O1 -c /tmp/x.c
xgcc: internal compiler error: Segmentation fault (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


[Bug c/50996] segfault cross-compiling for lm32

2011-11-05 Thread rubini at gnudd dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50996

--- Comment #1 from Alessandro Rubini  2011-11-05 
17:20:41 UTC ---

I removed more stuff. What follows is the minimal file that triggers
the error. Swapping the && operands won't make it segfault



void
envz_entry(char *envz)
{
  char *buf_ptr = (char *)envz;

  while(1)
  while(*buf_ptr && buf_ptr != envz)
  buf_ptr--;
}


[Bug tree-optimization/50693] Loop optimization restricted by GOTOs

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

--- Comment #25 from Jakub Jelinek  2011-11-05 
19:58:41 UTC ---
Author: jakub
Date: Sat Nov  5 19:58:37 2011
New Revision: 181014

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181014
Log:
PR tree-optimization/50693
* tree-cfg.c (gimple_can_merge_blocks_p): Allow merging with
non-forced user labels.
(gimple_merge_blocks): Turn non-forced user labels into
debug bind stmt with the label as first operand and reset value.
(gimple_duplicate_bb): Don't duplicate label debug stmts.
* dwarf2out.c (gen_label_die): Handle NOTE_INSN_DELETED_DEBUG_LABEL.
* final.c (final_scan_insn): Likewise.
(rest_of_clean_state): Don't dump NOTE_INSN_DELETED_DEBUG_LABEL.
* var-tracking.c (debug_label_num): New variable.
(delete_debug_insns): Don't delete DEBUG_INSNs for LABEL_DECLs,
instead turn them into NOTE_INSN_DELETED_DEBUG_LABEL notes.
* cfglayout.c (skip_insns_after_block, duplicate_insn_chain): Handle
NOTE_INSN_DELETED_DEBUG_LABEL.
(duplicate_insn_chain): Don't duplicate LABEL_DECL DEBUG_INSNs.
* insn-notes.def (DELETED_DEBUG_LABEL): New note kind.
* print-rtl.c (print_rtx): Handle NOTE_INSN_DELETED_DEBUG_LABEL.
* gengtype.c (adjust_field_rtx_def): Likewise.
* config/i386/i386.c (ix86_output_function_epilogue): For MachO
clear CODE_LABEL_NUMBER of NOTE_INSN_DELETED_DEBUG_LABEL
if their are at the end of function and nop hasn't been emitted.
* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/cfglayout.c
trunk/gcc/config/i386/i386.c
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/dwarf2out.c
trunk/gcc/final.c
trunk/gcc/gengtype.c
trunk/gcc/insn-notes.def
trunk/gcc/print-rtl.c
trunk/gcc/tree-cfg.c
trunk/gcc/var-tracking.c


[Bug tree-optimization/50693] Loop optimization restricted by GOTOs

2011-11-05 Thread alex.gaynor at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50693

--- Comment #26 from Alex Gaynor  2011-11-05 
20:08:08 UTC ---
Thank you very much for fixing this!


[Bug other/50991] crtstuff.c:65:23: fatal error: libgcc_tm.h: No such file or directory

2011-11-05 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50991

--- Comment #8 from John David Anglin  2011-11-05 
20:27:32 UTC ---
(In reply to comment #2)
> I've only once seens this in a -j32 sparc-sun-solaris2.11 build, but only
> during
> stage 2 for the sparcv9 multilib.  It never occured  during any other parallel
> build, including x86_64-unknown-linux-gnu with -j96.  Unfortunately, I cannot
> see how this can happen: we do have this dependency in libgcc/Makefile.in:
> 
> $(libgcc-objects) $(libgcc-s-objects) $(libgcc-eh-objects) \
> $(libgcov-objects) \
> $(libunwind-objects) $(libunwind-s-objects) \
> $(extra-parts): libgcc_tm.h

Shouldn't the last line be:

  $(EXTRA_PARTS): libgcc_tm.h


[Bug rtl-optimization/50448] [4.5/4.6/4.7 Regression] Missed optimization accessing struct component with integer address

2011-11-05 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50448

Georg-Johann Lay  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #7 from Georg-Johann Lay  2011-11-05 
20:37:25 UTC ---
Fixed in 4.7.0


[Bug libstdc++/44436] [C++0x] Implement emplace* in associative and unordered containers

2011-11-05 Thread zeratul976 at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44436

Nathan Ridge  changed:

   What|Removed |Added

 CC||zeratul976 at hotmail dot
   ||com

--- Comment #29 from Nathan Ridge  2011-11-05 
20:38:10 UTC ---
Should the entry for 23.2.4 on the Library Status page
(http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.200x)
not say "Partial" until this is implemented?


[Bug c++/50431] [C++0x] bug in def array size with a lambda

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

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #5 from Paolo Carlini  2011-11-05 
21:33:07 UTC ---
I guess we can close this as fixed in 4.7.0.


[Bug c++/47749] Wrong function return value

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

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed|2011-02-15 10:25:35 |2011-11-05
 Ever Confirmed|0   |1


[Bug c++/43503] field in-place decrement isn't optimized

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

Paolo Carlini  changed:

   What|Removed |Added

 CC|gcc-bugs at gcc dot gnu.org |rguenth at gcc dot gnu.org

--- Comment #3 from Paolo Carlini  2011-11-05 
23:36:26 UTC ---
Doesn't seem a C++ issue. Richard how are we doing on this?


[Bug c++/40927] Code fails to vectorize in g++ but does vectorize in gcc.

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

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC|gcc-bugs at gcc dot gnu.org |
  Known to work||4.6.2, 4.7.0
 Resolution||FIXED

--- Comment #2 from Paolo Carlini  2011-11-05 
23:44:51 UTC ---
Apparently fixed a lot of time ago, in 4.5.x. Otherwise, please re-open,
thanks.


[Bug c++/45114] implement C++0x alias-declaration

2011-11-05 Thread dodji at seketeli dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45114

--- Comment #12 from dodji at seketeli dot org  
2011-11-05 23:47:57 UTC ---
"vincenzo.innocente at cern dot ch"  a écrit:

> --- Comment #10 from vincenzo Innocente  
> 2011-10-31 16:06:41 UTC ---
> using the patch of comment 8 in the example below I get

Thank you for testing the patch.  Just FYI, I have updated it and posted
a newer, hopefully better version to gcc-patches[1].  It happens to
compile your example now.

[1]: http://gcc.gnu.org/ml/gcc-patches/2011-11/msg00747.html


[Bug libstdc++/44436] [C++0x] Implement emplace* in associative and unordered containers

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

--- Comment #30 from Jonathan Wakely  2011-11-06 
00:29:39 UTC ---
Author: redi
Date: Sun Nov  6 00:29:36 2011
New Revision: 181022

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181022
Log:
PR libstdc++/44436
* doc/xml/manual/status_cxx200x.xml: Document emplace members are
missing.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/doc/xml/manual/status_cxx200x.xml