[Bug other/58319] New: explicit cast doesn't disable -Wconversion warning.

2013-09-05 Thread pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58319

Bug ID: 58319
   Summary: explicit cast doesn't disable -Wconversion warning.
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pluto at agmk dot net

$ cat u.cpp 
struct X { unsigned field : 31; };

int main()
{
unsigned u = 0u;
X x = { .field = static_cast typeof( X::field ) ( u ) };
return x.field;
}

$ g++ u.cpp -c -Wconversion
u.cpp: In function ‘int main()’:
u.cpp:6:58: warning: conversion to ‘unsigned int:31’ from ‘unsigned int’ may
alter its value [-Wconversion]
  X x = { .field = static_cast typeof( X::field ) ( u ) };
  ^

[Bug c++/58317] Calling a method while preparing to call the constructor should be illegal

2013-09-05 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58317

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org ---
You're wrong, the variable's name is in scope following it's declarator, so
it's syntactically valid and should be accepted by a conforming compiler.  It
is a bug that there's no warning but that's already recorded elsewhere in
Bugzilla.

For a valid program that refers to a variable during its initialization
consider:

struct A {
  static int f() { return 0; }
  A(int) { }
};

int main() {
  A a(a.f());
}


[Bug tree-optimization/58318] very slow compilation on x86_64-linux with -O3 and -g and checking enabled

2013-09-05 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58318

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||compile-time-hog
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-09-05
Version|unknown |4.9.0
Summary|very slow compilation on|very slow compilation on
   |x86_64-linux with -O3 and   |x86_64-linux with -O3 and
   |-g  |-g and checking enabled
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
Confirmed.  We completely unroll the loop nest in bar () after inlining foo ().
In the -g case we retain a ton of DEBUG_STMTs - 577185 - in a single basic
block.  So walking all of them causes the slowdown, the walking done by
the verifiers - did you compare trunk with --enable-checking=release?  I can
see the same stmts with using GCC 4.8.

A quick check with a non-bootstrapped cc1 but release checking makes the
slowdown go away.

Still, eventually the checkers may need some speed related TLC.


[Bug tree-optimization/58311] [4.9 Regression] ICE: SIGSEGV in hash_table::find_slot_with_hash() with -fdevirtualize

2013-09-05 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58311

Jan Hubicka hubicka at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2013-09-05
 Ever confirmed|0   |1

--- Comment #1 from Jan Hubicka hubicka at gcc dot gnu.org ---
mine. Obviously without -O we should not try to look for the targets.  Will fix
it shortly.


[Bug libgomp/52303] libgomp leaves threads lying around that cause trouble if the program is later fork()'d

2013-09-05 Thread olivier.grisel at ensta dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52303

Olivier Grisel olivier.grisel at ensta dot org changed:

   What|Removed |Added

 CC||olivier.grisel at ensta dot org

--- Comment #4 from Olivier Grisel olivier.grisel at ensta dot org ---
Wouldn't it be possible to make the libgomp runtime record the pid of the
process who initialized the openmp thread pool and then whenever a parallel
section is reached by the process to check whether the pid of the current
process matches the pid that initialized the thread pool? If not a new init
could be triggered at that point to make it possible to have a fork-child
process use openmp sections in turn transparently.

Alternatively it would be nice to have access to a public function to shutdown
(de-initialize) a thread pool prior to a fork.


[Bug target/58320] New: [4.7 / 4.8 / 4.9 Regression] code used in autoconf test fails with -O2, works with -O0

2013-09-05 Thread doko at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58320

Bug ID: 58320
   Summary: [4.7 / 4.8 / 4.9 Regression] code used in autoconf
test fails with -O2, works with -O0
   Product: gcc
   Version: 4.7.4
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org

seen on arm-linux-gnueabihf, as part of an autoconf test in librep:

$ cat stack.c 
#include stdlib.h

void inner (char *foo) {
  char bar;
  exit (!(foo = bar));
}

void main () {
  char foo;
  inner (foo);
}

$ gcc-4.6 -o conftest -O2 stack.c  ./conftest ; echo $?
0
$ gcc-4.7 -o conftest -O2 stack.c  ./conftest ; echo $?
1
$ gcc-4.8 -o conftest -O2 stack.c  ./conftest ; echo $?
1
$ gcc-4.8 -o conftest -O0 stack.c  ./conftest ; echo $?
0


[Bug libgomp/52303] libgomp leaves threads lying around that cause trouble if the program is later fork()'d

2013-09-05 Thread olivier.grisel at ensta dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52303

--- Comment #5 from Olivier Grisel olivier.grisel at ensta dot org ---
The second option is basically was is being asked for at the end of this
section:

  http://bisqwit.iki.fi/story/howto/openmp/#OpenmpAndFork


[Bug other/58319] explicit cast doesn't disable -Wconversion warning.

2013-09-05 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58319

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com ---
Your cast does nothing, because your typeof (or decltype) is just unsigned int.
Given that, the warning makes sense to me and certainly is well known.


[Bug target/58320] [4.7 / 4.8 / 4.9 Regression] code used in autoconf test fails with -O2, works with -O0

2013-09-05 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58320

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
Well, it's clearly a bogus test - you are comparing addresses of two distinct
objects which invokes undefined behavior.


[Bug libstdc++/47762] FAIL: ext/mt_allocator/deallocate_global_thread-1.cc execution test

2013-09-05 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47762

--- Comment #24 from Dominique d'Humieres dominiq at lps dot ens.fr ---
 AFAICT the failures have disappeared on powerpc-apple-darwin9 between 
 revisions 186224 and 186440.

Unfortunately they have reappeared between revisions 197010 (OK) and 197531
(FAIL).


[Bug testsuite/58321] New: FAIL: gcc.target/i386/memcpy-strategy-3.c scan-assembler-times memcpy 2 on x86_64-apple-darwin*

2013-09-05 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58321

Bug ID: 58321
   Summary: FAIL: gcc.target/i386/memcpy-strategy-3.c
scan-assembler-times memcpy 2 on  x86_64-apple-darwin*
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dominiq at lps dot ens.fr
CC: davidxl at gcc dot gnu.org, iains at gcc dot gnu.org
  Host: x86_64-apple-darwin*
Target: x86_64-apple-darwin*
 Build: x86_64-apple-darwin*

The tests gcc.target/i386/memcpy-strategy-3.c and memset-strategy-1.c on
x86_64-apple-darwin*

FAIL: gcc.target/i386/memcpy-strategy-3.c scan-assembler-times memcpy 2
FAIL: gcc.target/i386/memset-strategy-1.c scan-assembler-times memset 2

Running the test manually I get

[macbook] f90/bug% grep memset memset-strategy-1.s
jmp_memset
[macbook] f90/bug% grep memcpy memcpy-strategy-3.s
call_memcpy


[Bug other/58319] explicit cast doesn't disable -Wconversion warning.

2013-09-05 Thread pluto at agmk dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58319

--- Comment #2 from Pawel Sikora pluto at agmk dot net ---
(In reply to Paolo Carlini from comment #1)
 Your cast does nothing, because your typeof (or decltype) is just unsigned
 int. Given that, the warning makes sense to me and certainly is well known.

so how can i cast this value to avoid warning?


[Bug other/58319] explicit cast doesn't disable -Wconversion warning.

2013-09-05 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58319

--- Comment #3 from Jonathan Wakely redi at gcc dot gnu.org ---
You can ensure the value is not too large for the target:

X x = { .field = ( u  (-1u  1) ) };


[Bug rtl-optimization/58322] New: similar simple code produces different (nd non-optimal) result

2013-09-05 Thread michael at reinelt dot co.at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58322

Bug ID: 58322
   Summary: similar simple code produces different (nd
non-optimal) result
   Product: gcc
   Version: 4.7.2
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: michael at reinelt dot co.at

avr-gcc on a very simple test case produces different assembler code for the
same statement:

#include stdint.h
#include avr/io.h

// if avr/io.h is not available:
// #define _MMIO_BYTE(mem_addr) (*(volatile uint8_t *)(mem_addr))
// #define _SFR_MEM8(mem_addr) _MMIO_BYTE(mem_addr)
// #define UCSR0B _SFR_MEM8(0xC1)

char flag;

void test1(void)
{
UCSR0B |= 1;
}

void test2(void)
{
if (flag) {
UCSR0B |= 1;
}
}

Result:

test1:
ldi r30,lo8(-63) ;  tmp44,
ldi r31,0 ; 
ld r24,Z ;  D.1400, MEM[(volatile uint8_t *)193B]
ori r24,lo8(1) ;  D.1400,
st Z,r24 ;  MEM[(volatile uint8_t *)193B], D.1400
ret

test2:
lds r24,flag ;  flag, flag
tst r24 ;  flag
breq .L2 ; ,
lds r24,193 ;  D.1397, MEM[(volatile uint8_t *)193B]
ori r24,lo8(1) ;  D.1397,
sts 193,r24 ;  MEM[(volatile uint8_t *)193B], D.1397
.L2:
ret

in test1, the simple bit-set in memory (which is a UART control register) is
done by indirect addressing with Z-Register, while in the second case (inside
the if() body) it is changed to direct load/store. The resulting binary size is
the same in both cases (5 words), but the first code is slower (7 cycles
instead of 5), uses more registers, and, last but not least, looks more
complicated :-)

I tried to play around with some rtl-dump options (I am not familiar with RTL),
and found out that there is a change in pass 162 (cprop1) where the addressing
in test2 changes from indirect to direct (resulting in lds/sts instead of
ld,Z), while the code in test1 does not change.


[Bug c/58323] New: [-Wall] No warning when uninitialized integer

2013-09-05 Thread tkhai at yandex dot ru
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58323

Bug ID: 58323
   Summary: [-Wall] No warning when uninitialized integer
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tkhai at yandex dot ru

Hi,

the following example compiles without warnings:

$ cat a.c
int func (int p)
{
int x;
if (p != 0)
x = 1;
return x;
}

$ gcc -c a.c -Wall
(no messages)

According to Ian Lance Taylor, this is a BUG:
http://gcc.gnu.org/ml/gcc/2013-09/msg00033.html

My gcc version is 4.4.5. I can't try newer versions.

Kirill


[Bug bootstrap/58242] [4.9 regression] linux-android.c:40:7: error: 'OPTION_BIONIC' was not declared in this scope breaks bootstrap on powerpc64-linux

2013-09-05 Thread aivchenk at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58242

--- Comment #3 from Alexander Ivchenko aivchenk at gmail dot com ---
Should be fixed now by r202274


[Bug fortran/58324] New: Incorrect iostat while reading SEQUENTIAL file

2013-09-05 Thread larix at libero dot it
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58324

Bug ID: 58324
   Summary: Incorrect iostat while reading SEQUENTIAL file
   Product: gcc
   Version: 4.7.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: larix at libero dot it

Created attachment 30750
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30750action=edit
source code

reading a formatted sequential file, if last record is not teminated by
LineFeed character, 

read(unit=111,fmt=*, iostat=j) i
produces j= -1

while 
read(111,'(I1)', iostat=j) i
produces j= 0


see attached source reproducing the bug


[Bug target/58320] [4.7 / 4.8 / 4.9 Regression] code used in autoconf test fails with -O2, works with -O0

2013-09-05 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58320

--- Comment #2 from Andreas Schwab sch...@linux-m68k.org ---
Casting to uintptr_t should probably make this work as intented.


[Bug target/58065] ARM MALLOC_ABI_ALIGNMENT is wrong

2013-09-05 Thread clyon at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58065

--- Comment #9 from clyon at gcc dot gnu.org ---
Author: clyon
Date: Thu Sep  5 12:27:56 2013
New Revision: 202276

URL: http://gcc.gnu.org/viewcvs?rev=202276root=gccview=rev
Log:
2013-09-05  Christophe Lyon  christophe.l...@linaro.org

Backport from trunk r201589.
2013-08-08  Bernd Edlinger  bernd.edlin...@hotmail.de

PR target/58065
* config/arm/arm.h (MALLOC_ABI_ALIGNMENT): Define.


Modified:
branches/linaro/gcc-4_8-branch/   (props changed)
branches/linaro/gcc-4_8-branch/gcc/ChangeLog.linaro
branches/linaro/gcc-4_8-branch/gcc/config/arm/arm.h

Propchange: branches/linaro/gcc-4_8-branch/
('svn:mergeinfo' modified)


[Bug target/57431] ICE in simplify_const_unary_operation vld1_dup_s64/vst1_s64

2013-09-05 Thread clyon at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57431

--- Comment #3 from clyon at gcc dot gnu.org ---
Author: clyon
Date: Thu Sep  5 12:31:03 2013
New Revision: 202277

URL: http://gcc.gnu.org/viewcvs?rev=202277root=gccview=rev
Log:
2013-09-05  Christophe Lyon  christophe.l...@linaro.org

Backport from trunk r201599.
2013-08-08  Richard Earnshaw  rearn...@arm.com

PR target/57431
* arm/neon.md (neon_vld1_dupdi): New expand pattern.
(neon_vld1_dupmode VD iterator): Iterate over VD not VDX.


Modified:
branches/linaro/gcc-4_8-branch/   (props changed)
branches/linaro/gcc-4_8-branch/gcc/ChangeLog.linaro
branches/linaro/gcc-4_8-branch/gcc/config/arm/neon.md

Propchange: branches/linaro/gcc-4_8-branch/
('svn:mergeinfo' modified)


[Bug target/56315] ARM: Improve use of 64-bit constants in logical operations

2013-09-05 Thread clyon at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56315

--- Comment #2 from clyon at gcc dot gnu.org ---
Author: clyon
Date: Thu Sep  5 12:38:03 2013
New Revision: 202280

URL: http://gcc.gnu.org/viewcvs?rev=202280root=gccview=rev
Log:
gcc/
2013-09-05  Christophe Lyon  christophe.l...@linaro.org

Backport from trunk r199527,199792,199814.
2013-05-31  Kyrylo Tkachov  kyrylo.tkac...@arm.com

PR target/56315
* config/arm/arm.c (const_ok_for_dimode_op): Handle IOR.
* config/arm/arm.md (*iordi3_insn): Change to insn_and_split.
* config/arm/neon.md (iordi3_neon): Remove.
(neon_vorrmode): Generate iordi3 instead of iordi3_neon.
* config/arm/predicates.md (imm_for_neon_logic_operand):
Move to earlier in the file.
(neon_logic_op2): Likewise.
(arm_iordi_operand_neon): New predicate.

2013-06-07  Kyrylo Tkachov  kyrylo.tkac...@arm.com

* config/arm/constraints.md (Df): New constraint.
* config/arm/arm.md (iordi3_insn): Use Df constraint instead of De.
Correct length attribute for last two alternatives.

2013-06-07  Kyrylo Tkachov  kyrylo.tkac...@arm.com

PR target/56315
* config/arm/arm.md (*xordi3_insn): Change to insn_and_split.
(xordi3): Change operand 2 constraint to arm_xordi_operand.
* config/arm/arm.c (const_ok_for_dimode_op): Handle XOR.
* config/arm/constraints.md (Dg): New constraint.
* config/arm/neon.md (xordi3_neon): Remove.
(neon_veormode): Generate xordi3 instead of xordi3_neon.
* config/arm/predicates.md (arm_xordi_operand): New predicate.

gcc/testsuite/
2013-09-05  Christophe Lyon  christophe.l...@linaro.org

Backport from trunk r199527,199814,201435.
2013-05-31  Kyrylo Tkachov  kyrylo.tkac...@arm.com

PR target/56315
* gcc.target/arm/iordi3-opt.c: New test.

2013-06-07  Kyrylo Tkachov  kyrylo.tkac...@arm.com

PR target/56315
* gcc.target/arm/xordi3-opt.c: New test.

2013-08-02  Kyrylo Tkachov  kyrylo.tkac...@arm.com

* gcc.target/arm/neon-for-64bits-2.c: Delete.


Added:
branches/linaro/gcc-4_8-branch/gcc/testsuite/gcc.target/arm/iordi3-opt.c
  - copied unchanged from r199527,
trunk/gcc/testsuite/gcc.target/arm/iordi3-opt.c
branches/linaro/gcc-4_8-branch/gcc/testsuite/gcc.target/arm/xordi3-opt.c
  - copied unchanged from r199814,
trunk/gcc/testsuite/gcc.target/arm/xordi3-opt.c
Removed:
   
branches/linaro/gcc-4_8-branch/gcc/testsuite/gcc.target/arm/neon-for-64bits-2.c
Modified:
branches/linaro/gcc-4_8-branch/   (props changed)
branches/linaro/gcc-4_8-branch/gcc/ChangeLog.linaro
branches/linaro/gcc-4_8-branch/gcc/config/arm/arm.c
branches/linaro/gcc-4_8-branch/gcc/config/arm/arm.md
branches/linaro/gcc-4_8-branch/gcc/config/arm/constraints.md
branches/linaro/gcc-4_8-branch/gcc/config/arm/neon.md
branches/linaro/gcc-4_8-branch/gcc/config/arm/predicates.md
branches/linaro/gcc-4_8-branch/gcc/testsuite/ChangeLog.linaro

Propchange: branches/linaro/gcc-4_8-branch/
('svn:mergeinfo' modified)


[Bug tree-optimization/58137] [trunk, ICE] full unroll + AVX2 vectorization

2013-09-05 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58137

--- Comment #6 from Richard Biener rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Thu Sep  5 12:45:20 2013
New Revision: 202282

URL: http://gcc.gnu.org/viewcvs?rev=202282root=gccview=rev
Log:
2013-09-05  Richard Biener  rguent...@suse.de

PR tree-optimization/58137
* tree-vect-stmts.c (get_vectype_for_scalar_type_and_size):
Do not create vectors of pointers.
* tree-vect-loop.c (get_initial_def_for_induction): Use proper
types for the components of the vector initializer.
* tree-cfg.c (verify_gimple_assign_binary): Remove special-casing
allowing pointer vectors with PLUS_EXPR/MINUS_EXPR.

* gcc.target/i386/pr58137.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.target/i386/pr58137.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-cfg.c
trunk/gcc/tree-vect-loop.c
trunk/gcc/tree-vect-stmts.c


[Bug tree-optimization/58137] [trunk, ICE] full unroll + AVX2 vectorization

2013-09-05 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58137

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Richard Biener rguenth at gcc dot gnu.org ---
Fixed.


[Bug target/58320] [4.7 / 4.8 / 4.9 Regression] code used in autoconf test fails with -O2, works with -O0

2013-09-05 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58320

--- Comment #3 from Richard Biener rguenth at gcc dot gnu.org ---
Well, until the compiler comes along and inlines 'inner'.

This is really a GIGO test.


[Bug target/58139] PowerPC volatile VSX register live across call

2013-09-05 Thread bergner at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139

Peter Bergner bergner at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |bergner at gcc dot 
gnu.org

--- Comment #5 from Peter Bergner bergner at gcc dot gnu.org ---
Fixed.  Will wait a couple of weeks for any fall out before committing to the
FSF 4.8 branch.


[Bug c++/24702] Koenig found functoid ref, but cannot be used as a function

2013-09-05 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24702

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

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

--- Comment #5 from Paolo Carlini paolo.carlini at oracle dot com ---
Gaby, can you help me with this old issue? I can't find any DR still open in
this area, and we behave exactly like current clang  icc, that is we reject
the last three lines (about unqualified dummyFunct, myDummyFunct, and
mymyDummyFunct). Can we resolve this bug?


[Bug bootstrap/55706] [4.8 Regression] failure to build libstdc++ in stage 1

2013-09-05 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55706

--- Comment #5 from Jonathan Wakely redi at gcc dot gnu.org ---
(In reply to roger pack from comment #4)
 (as a note, appears mingw-w64 2.0.8 is not sufficient you need something
 newer...)

It should be. 2.0.8 is from r5746 which is new enough.


[Bug bootstrap/55706] [4.8 Regression] failue to build libstdc++ in stage 1

2013-09-05 Thread rogerdpack at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55706

roger pack rogerdpack at gmail dot com changed:

   What|Removed |Added

 CC||rogerdpack at gmail dot com

--- Comment #4 from roger pack rogerdpack at gmail dot com ---
(as a note, appears mingw-w64 2.0.8 is not sufficient you need something
newer...)


[Bug c++/58300] ICE: in decide_is_symbol_needed, at cgraphunit.c:233 with -fvtable-verify=preinit on invalid code

2013-09-05 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58300

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC|cmtice at google dot com   |
   Assignee|unassigned at gcc dot gnu.org  |cmtice at google dot com

--- Comment #5 from Paolo Carlini paolo.carlini at oracle dot com ---
Thanks!


[Bug c++/24702] Koenig found functoid ref, but cannot be used as a function

2013-09-05 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24702

--- Comment #6 from Jonathan Wakely redi at gcc dot gnu.org ---
The standard says:

When considering an associated namespace, the lookup is the same as the lookup
performed when the associated namespace is used as a qualifier (3.4.3.2) except
that:
- [...]
- [...]
- All names except those of (possibly overloaded) functions and function
templates are ignored.

So non-functions are ignored.


[Bug target/58139] PowerPC volatile VSX register live across call

2013-09-05 Thread bergner at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139

--- Comment #4 from Peter Bergner bergner at gcc dot gnu.org ---
Author: bergner
Date: Thu Sep  5 14:09:07 2013
New Revision: 202286

URL: http://gcc.gnu.org/viewcvs?rev=202286root=gccview=rev
Log:
PR target/58139
* reginfo.c (choose_hard_reg_mode): Scan through all mode classes
looking for widest mode.

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


[Bug bootstrap/55706] [4.8 Regression] failure to build libstdc++ in stage 1

2013-09-05 Thread rogerdpack at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55706

--- Comment #6 from roger pack rogerdpack at gmail dot com ---
Yeah I was getting the same error message with 2.0.8 and pinged them about it. 
Apparently the crt they bundled with 2.0.8 wasn't new enough or something like
that, and they plan on releasing a new release soon...from what I could glean
that is.


[Bug c++/24702] Koenig found functoid ref, but cannot be used as a function

2013-09-05 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24702

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #7 from Jonathan Wakely redi at gcc dot gnu.org ---
See http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#218 for the
rationale.


[Bug rtl-optimization/55342] [4.8/4.9 Regression] [LRA,x86] Non-optimal code for simple loop with LRA

2013-09-05 Thread ysrumyan at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55342

--- Comment #8 from Yuri Rumyantsev ysrumyan at gmail dot com ---
Created attachment 30751
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30751action=edit
modified test-case

Modified test-case to reproduce sub-optimal register allocation.


[Bug c++/24702] Koenig found functoid ref, but cannot be used as a function

2013-09-05 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24702

--- Comment #8 from Paolo Carlini paolo.carlini at oracle dot com ---
Thanks Jon!


[Bug target/58269] [4.9 Regression] ICE when building libobjc on x86_64-apple-darwin* after revision 201915

2013-09-05 Thread iains at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58269

--- Comment #7 from Iain Sandoe iains at gcc dot gnu.org ---
(In reply to tocarip.intel from comment #6)
 -|| (TARGET_SSE  SSE_REGNO_P (regno) 

 Those changes are not needed. If TARGET_64BIT is fasle all sse registers
 except xmm0-xmm7 should be fixed. Correct fix is 

snip

 Looks like this will break ABI. Before we returned true for e. g. xmm10.

indeed, that was worrying me too.

 I couldn't find Darwin ABI to check which behaivor is correct.

The ABI for [x86_64] Darwin *should be* the same as 
System V Application Binary Interface AMD64 Architecture Processor Supplement
Draft Version 0.99.5

it is possible that:
(a) GCC has been broken a while and this is just not covered by the test-suite.
(b) the system ABI has deviated from the referenced document.

However - regardless of the doc, the system ABI is effectively defined by
Apple's GCC-4.2.1 (or successor clang, where that is not the system default).

 If we want to keep current behaivor something like 

snip 

 Should work.

I will apply your revised patch (and keep the second amendment in reserve) and
do some compat tests to find out what we need to do to be compliant with the
system

thanks for the patch, iain.


[Bug c++/58325] New: Spurious unused-but-set-variable warning on delete[] of volatile pointer

2013-09-05 Thread cyp561 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58325

Bug ID: 58325
   Summary: Spurious unused-but-set-variable warning on delete[]
of volatile pointer
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: cyp561 at gmail dot com

The following code should not generate “volatile.cpp:3:16: warning: variable
‘usedAndSet’ set but not used [-Wunused-but-set-variable]”, but does anyway:

{{{
int main()
{
int *volatile setAndUsed = new int[1];
delete[] setAndUsed;
}
}}}

The generated code looks correct, I assume _ZdaPv is the delete[]:

{{{
.filevolatile.cpp
.section.text.startup,ax,@progbits
.p2align 4,,15
.globlmain
.typemain, @function
main:
.LFB0:
.cfi_startproc
subq$24, %rsp
.cfi_def_cfa_offset 32
movl$4, %edi
call_Znam
movq%rax, 8(%rsp)
movq8(%rsp), %rdi
testq%rdi, %rdi
je.L2
call_ZdaPv
.L2:
xorl%eax, %eax
addq$24, %rsp
.cfi_def_cfa_offset 8
ret
.cfi_endproc
.LFE0:
.sizemain, .-main
.identGCC: (Gentoo 4.6.4 p1.0, pie-0.5.2) 4.6.4
.section.note.GNU-stack,,@progbits
}}}

Changing “delete[]” to “delete” or removing “volatile” removes the warning.
Adding “(void)setAndUsed;” squelches the warning.

Gives the warning: g++-4.6.4 g++-4.7.3
Does not give a warning: g++-3.4.6  g++-4.1.2  g++-4.2.4  g++-4.3.6  g++-4.4.7 
g++-4.5.4

[Bug tree-optimization/58326] [4.9 Regression] ICE in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:551

2013-09-05 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58326

Dominique d'Humieres dominiq at lps dot ens.fr changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-09-05
Summary|ICE in  |[4.9 Regression] ICE in
   |check_loop_closed_ssa_use,  |check_loop_closed_ssa_use,
   |at  |at
   |tree-ssa-loop-manip.c:551   |tree-ssa-loop-manip.c:551
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres dominiq at lps dot ens.fr ---
The code compiles with revision 201729.


[Bug c++/28107] Incomplete type in struct added to global namespace

2013-09-05 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28107

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC|gcc-bugs at gcc dot gnu.org|
 Resolution|--- |INVALID

--- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com ---
Let's close this.


[Bug tree-optimization/58326] [4.9 Regression] ICE in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:551

2013-09-05 Thread su at cs dot ucdavis.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58326

--- Comment #2 from Zhendong Su su at cs dot ucdavis.edu ---
For additional info, please find below a variant that fails only at -O3: 

-

int a, b, c, d;

void foo ()
{
  int e;

 lbl:
  for (c = 0; c  2; c++)
{
  e = d;
  for (; a; a++)
{
  d = e;
  if (b)
goto lbl; 
}
}
}


[Bug c++/58252] [4.9 Regression] ice in gimple_get_virt_method_for_binfo with -O2

2013-09-05 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58252

Jan Hubicka hubicka at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |hubicka at gcc dot 
gnu.org

--- Comment #4 from Jan Hubicka hubicka at gcc dot gnu.org ---
Jason,
I think I need your help here.  There is OBJ_TYPE_REF calling method of class
_impl_Container with token 3.  
We walk possible targets and while walking StructDef, we find BINFO matghing
_impl_Container and walk its vtable for method at token 3. The vtable however
does not contain 3 methods at all.

I added code to pretty-print to also print obj_type_ref_class_type and I get:
  bb 2:
  tcd = cd;
  D.3158 = svnt-_vptr.omniServant;
  D.3159 = D.3158 + 16;
  D.3160 = *D.3159;
  _PD_repoId.0 = _PD_repoId;
  D.3170 = OBJ_TYPE_REF(D.3160;(struct omniServant)svnt-2) (svnt,
_PD_repoId.0);
  impl = D.3170;
  D.3162 = impl-D.2424.D.2333._vptr.omniServant;
  D.3163 = D.3162 + 24;
  D.3164 = *D.3163;
  D.3165 = tcd-arg_3;
  D.3166 = tcd-arg_2;
  D.3167 = tcd-arg_1;
  D.3168 = tcd-arg_0;
  D.3171 = OBJ_TYPE_REF(D.3164;(struct _impl_Container)impl-3) (impl, D.3168,
D.3167, D.3166, D.3165);

So I think the problem i sthat the code really looks into vtable of
omniServant, but OBJ_TYPE_REF is interepretted as _impl_Container.
I take the class type from the THIS pointer type of the method_type of the
call.  Is it posisble for omniServant vtable to contains method accepting
different types?

In that case we will need different implementation of obj_type_ref_class_type?


[Bug target/58139] PowerPC volatile VSX register live across call

2013-09-05 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139

--- Comment #6 from Dominique d'Humieres dominiq at lps dot ens.fr ---
 New Revision: 202286

This seems to break bootstrap on *86*-*-*, see

http://gcc.gnu.org/ml/gcc-regression/2013-09/


[Bug tree-optimization/58326] [4.9 Regression] ICE in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:551

2013-09-05 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58326

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |4.9.0

--- Comment #3 from Jakub Jelinek jakub at gcc dot gnu.org ---
Started with r196770.


[Bug c++/40075] deprecated(xxx) doesn't work on function parameter

2013-09-05 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40075

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-09-05
 CC|gcc-bugs at gcc dot gnu.org|
 Ever confirmed|0   |1

--- Comment #3 from Paolo Carlini paolo.carlini at oracle dot com ---
Deprecated attributes applied via typedefs, like INT2, are weaker in other ways
too: for example my fix for c++/58305 isn't enough for those.


[Bug libquadmath/58327] New: Problem of quadmath in connection with SDL2

2013-09-05 Thread u.weber at gipko dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58327

Bug ID: 58327
   Summary: Problem of quadmath in connection with SDL2
   Product: gcc
   Version: 4.7.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libquadmath
  Assignee: unassigned at gcc dot gnu.org
  Reporter: u.weber at gipko dot de

quadmath_snprintf gives strange results, when SDL2
(http://www.libsdl.org/download-2.0.php) is additionally included. I'm using
MinGW with DevC++ or Code::Blocks. The short program:

  extern C {
  #include quadmath.h
  }

  #include SDL2\SDL.h
  #include iostream

  int main(int argc, char* argv[])
  {  char buf[128];
 quadmath_snprintf (buf, sizeof buf, %+-#*.20Qe, 46, M_PIq);
 std::cout   PI =   (float)M_PIq   /   buf  std::endl;   
  }

gives the result:

PI = 3.14159 / +3.78539161562520278725e-4917

but when I delete or comment the line  // #include SDL2\SDL.h 
I get the expected result:

PI = 3.14159 / +3.14159265358979323846e+00

I guess this is related to Bug 51007 but I don't know how to fix this problem.
I would like to use quadmath and SDL2 together.


[Bug gcov-profile/58250] -fprofile-use causes: warning: -fprefetch-loop-arrays is not supported with -Os

2013-09-05 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58250

--- Comment #3 from Jan Hubicka hubicka at ucw dot cz ---
 Prefetching generally increases code size, so I think we shouldn't do it, at
 least not by default.  So I'd say for !optimize_size -fprofile-use should just
 not add -fprefetch-loop-arrays.

Yep, I think -fprofile-use code should not enable code expanding optimizations
when
optimize_size.   I will look into that.

Honza
 
 -- 
 You are receiving this mail because:
 You are on the CC list for the bug.


[Bug middle-end/58096] [4.9 Regression] gcc.dg/tree-ssa/attr-alias.c fails with r201439

2013-09-05 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58096

--- Comment #8 from Jan Hubicka hubicka at gcc dot gnu.org ---
It was fixed by
2013-08-29  Jan Hubicka  j...@suse.cz

* cgraph.c (cgraph_function_body_availability): Handle weakref
correctly.
* passes.def: Remove pass_fixup_cfg.
* ipa-inline.c (ipa_inline): When not optimizing, do not inline;
track when we need to remove functions.
(gate_ipa_inline): Execute inlining always; add comment why.
(pass_data_ipa_inline): Remove TODO_remove_functions.
* ipa-inline-analysis.c (inline_generate_summary): When not optimizing
do not produce summaries.
* symtab.c (change_decl_assembler_name): Handle renaming of weakrefs.
(symtab_nonoverwritable_alias): Assert we are not called on weakref.
* varpool.c (cgraph_variable_initializer_availability): Fix weakrefs,
constant pool and vtable.


[Bug middle-end/28831] [4.7/4.8/4.9 Regression] Aggregate copy not elided when using a return value as a pass-by-value parameter

2013-09-05 Thread chip at pobox dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28831

--- Comment #22 from Chip Salzenberg chip at pobox dot com ---
Anyone?  Bueller?


[Bug c++/58328] [C++11] bogus: error: constructor required before non-static data member for

2013-09-05 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58328

--- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com ---
I suspect the error isn't bogus, current clang++ also rejects it.


[Bug c++/58328] [C++11] bogus: error: constructor required before non-static data member for

2013-09-05 Thread ppluzhnikov at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58328

--- Comment #2 from Paul Pluzhnikov ppluzhnikov at google dot com ---
(In reply to Paolo Carlini from comment #1)
 I suspect the error isn't bogus, current clang++ also rejects it.

Hmm, perhaps you are correct. The original test that is *not* rejected by clang
was:

struct A {
  struct B {
int x, y = 1;
  };

  A(const B opts = B()) {}
};

But perhaps Clang doesn't reject it in error?


[Bug target/58139] PowerPC volatile VSX register live across call

2013-09-05 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139

--- Comment #8 from Dominique d'Humieres dominiq at lps dot ens.fr ---
 FWIW, I was able to bootstrap subversion id 202295 on my x86_68 laptop 
 running RHEL 6.4, building c, c++, fortran languages, and using 
 --enable-lto --without-ppl --without-cloog.

The failure is in libobj:

libtool: compile:  /opt/gcc/build_w/./gcc/xgcc -B/opt/gcc/build_w/./gcc/
-B/opt/gcc/gcc4.9w/x86_64-apple-darwin10.8.0/bin/
-B/opt/gcc/gcc4.9w/x86_64-apple-darwin10.8.0/lib/ -isystem
/opt/gcc/gcc4.9w/x86_64-apple-darwin10.8.0/include -isystem
/opt/gcc/gcc4.9w/x86_64-apple-darwin10.8.0/sys-include
/opt/gcc/work/libobjc/sendmsg.c -c -I. -I/opt/gcc/work/libobjc -g -O2 -W -Wall
-Wwrite-strings -Wstrict-prototypes -DIN_GCC -DIN_TARGET_LIBS
-fno-strict-aliasing -fexceptions -I/opt/gcc/work/libobjc/../gcc
-I/opt/gcc/work/libobjc/../gcc/config -I../.././gcc
-I/opt/gcc/work/libobjc/../libgcc -I../libgcc
-I/opt/gcc/work/libobjc/../include  -fno-common -DPIC -o .libs/sendmsg.o
xgcc: internal compiler error: Segmentation fault (program cc1)

This may be related to pr58269: compiling the reduced test in comment #2 with
the buid compiler gives the following ICE

[macbook] f90/bug% /opt/gcc/build_w/./gcc/xgcc -B/opt/gcc/build_w/./gcc/
pr58269.c
xgcc: internal compiler error: Segmentation fault (program cc1)
Abort

I am currently bootstrapping with r202295 reverted (2hours to go).


[Bug c++/58300] ICE: in decide_is_symbol_needed, at cgraphunit.c:233 with -fvtable-verify=preinit on invalid code

2013-09-05 Thread cmtice at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58300

--- Comment #6 from Caroline Tice cmtice at google dot com ---
When the preinit flag is used, the vtable verification constructor
initialization function was getting written to the assembly file before
cgraph_process_new_functions was being called (to process the new function),
which was causing an assertion failure in decide_is_symbol_needed (which
expects the symbol NOT to have its decl assembler name yet).  The fix is very
simple...reorder those two events.  This should not cause any errors.  I have a
patch that does this, which I have tested both on this test case and with the
new libvtv testsuite, and it passes in both places:

Index: gcc/cp/vtable-class-hierarchy.c
===
--- vtable-class-hierarchy.c(revision 202296)
+++ vtable-class-hierarchy.c(working copy)
@@ -1179,15 +1179,16 @@ vtv_generate_init_routine (void)
   TREE_USED (vtv_fndecl) = 1;
   DECL_PRESERVE_P (vtv_fndecl) = 1;
   if (flag_vtable_verify == VTV_PREINIT_PRIORITY)
-{
-  DECL_STATIC_CONSTRUCTOR (vtv_fndecl) = 0;
-  assemble_vtv_preinit_initializer (vtv_fndecl);
-}
+DECL_STATIC_CONSTRUCTOR (vtv_fndecl) = 0;

   gimplify_function_tree (vtv_fndecl);
   cgraph_add_new_function (vtv_fndecl, false);

   cgraph_process_new_functions ();
+
+  if (flag_vtable_verify == VTV_PREINIT_PRIORITY)
+assemble_vtv_preinit_initializer (vtv_fndecl);
+
 }
   pop_lang_context ();
 }


I will submit this patch for review soon.


[Bug c++/43452] Array delete causes error on incomplete type

2013-09-05 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43452

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 CC|gcc-bugs at gcc dot gnu.org|
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com

--- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com ---
Let's resolve this.


[Bug target/58139] PowerPC volatile VSX register live across call

2013-09-05 Thread bergner at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139

--- Comment #10 from Peter Bergner bergner at gcc dot gnu.org ---
Reading the comments above and pr58269, does this mean my patch just exposed a
latent bug?  ...and the supplied patches fix the latent bug?


[Bug c++/58300] ICE: in decide_is_symbol_needed, at cgraphunit.c:233 with -fvtable-verify=preinit on invalid code

2013-09-05 Thread cmtice at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58300

--- Comment #7 from Caroline Tice cmtice at google dot com ---
Created attachment 30752
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30752action=edit
Reorder two function calls to prevent an ICE.


[Bug c++/58300] ICE: in decide_is_symbol_needed, at cgraphunit.c:233 with -fvtable-verify=preinit on invalid code

2013-09-05 Thread cmtice at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58300

--- Comment #8 from Caroline Tice cmtice at google dot com ---
I have added the patch as an attachment, and also submitted it to the
gcc-patches list for review.


[Bug rtl-optimization/55342] [4.8/4.9 Regression] [LRA,x86] Non-optimal code for simple loop with LRA

2013-09-05 Thread ysrumyan at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55342

--- Comment #9 from Yuri Rumyantsev ysrumyan at gmail dot com ---
The issue still exists in 4.9 compiler but we got another 30% degradation after
r202165 fix. It can be reproduced with modified test-case which as attached
with any 4.9 compiler, namely code produced for inner loop looks like:

.L8:
movl%esi, %ecx
movl%esi, %edi
movzbl3(%esp), %edx
cmpb%cl, %dl
movl%edx, %ecx
cmovbe%ecx, %edi
.L4:
movl%esi, %edx
movl%edi, %ecx
subl%ecx, %edx
movl28(%esp), %ecx
movl28(%esp), %esi
addl$4, 28(%esp)
movb%dl, (%ecx)
movl%edi, %ecx
subl%ecx, %ebx
movl%edi, %edx
movzbl3(%esp), %ecx
movb%bl, 1(%esi)
subl%edx, %ecx
movl%edi, %ebx
movb%cl, 2(%esi)
movl28(%esp), %esi
cmpl%ebp, %eax
movb%bl, -1(%esi)
je.L1
.L5:
movzbl(%eax), %esi
leal3(%eax), %eax
movzbl-2(%eax), %ebx
notl%esi
notl%ebx
movl%esi, %edx
movzbl-1(%eax), %ecx
cmpb%bl, %dl
movb%cl, 3(%esp)
notb3(%esp)
jb.L8
movzbl3(%esp), %edx
movl%ebx, %edi
cmpb%bl, %dl
cmovbe%edx, %edi
jmp.L4

and you can see that (1) there are 2 additional moves on top of blocks marked
with .L4 and .L8; (2) redundant spill/fills of 'write' base in block marked
with .L4 (28(%esp)).
To reproduce it is sufficient to compile modified test-case with '-m32
-march=atom' options.


[Bug bootstrap/55706] [4.8 Regression] failure to build libstdc++ in stage 1

2013-09-05 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55706

--- Comment #7 from Jonathan Wakely redi at gcc dot gnu.org ---
Ah I see. Thanks for the info.


[Bug target/58269] [4.9 Regression] ICE when building libobjc on x86_64-apple-darwin* after revision 201915

2013-09-05 Thread tocarip.intel at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58269

tocarip.intel at gmail dot com changed:

   What|Removed |Added

 CC||tocarip.intel at gmail dot com

--- Comment #6 from tocarip.intel at gmail dot com ---
-|| (TARGET_SSE  SSE_REGNO_P (regno)  !fixed_regs[regno]));
+|| (TARGET_SSE  SSE_REGNO_P (regno)
+ (regno  FIRST_SSE_REG + SSE_REGPARM_MAX)
+ !fixed_regs[regno]));

Those changes are not needed. If TARGET_64BIT is fasle all sse registers except
xmm0-xmm7 should be fixed. Correct fix is 

index 0f4edb3..44b4b16 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -4231,10 +4231,10 @@ ix86_conditional_register_usage (void)
   /* If AVX512F is disabled, squash the registers.  */
   if (! TARGET_AVX512F)
   {
-for (i = FIRST_EXT_REX_SSE_REG; i  LAST_EXT_REX_SSE_REG; i++)
+for (i = FIRST_EXT_REX_SSE_REG; i = LAST_EXT_REX_SSE_REG; i++)
   fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = ;

-for (i = FIRST_MASK_REG; i  LAST_MASK_REG; i++)
+for (i = FIRST_MASK_REG; i = LAST_MASK_REG; i++)
   fixed_regs[i] = call_used_regs[i] = 1, reg_names[i] = ;
   }   
  }



-  if (TARGET_MACHO)
-{
-  if (SSE_REGNO_P (regno)  TARGET_SSE)
-return true;
-}
-  else
-{
-  if (TARGET_SSE  SSE_REGNO_P (regno)
-   (regno  FIRST_SSE_REG + SSE_REGPARM_MAX))
-return true;
-}
+  if (TARGET_SSE  SSE_REGNO_P (regno)
+   (regno  FIRST_SSE_REG + SSE_REGPARM_MAX))
+return true;

Looks like this will break ABI. Before we returned true for e. g. xmm10.
I couldn't find Darwin ABI to check which behaivor is correct.
If we want to keep current behaivor something like 

index 0f4edb3..a603167 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -5708,7 +5708,8 @@ ix86_function_arg_regno_p (int regno)

   if (TARGET_MACHO)
 {
-  if (SSE_REGNO_P (regno)  TARGET_SSE)
+  if (SSE_REGNO_P (regno)  TARGET_SSE
+  ! EXT_REX_SSE_REGNO_P (regno))
 return true;
 }
   else

Should work.


[Bug target/58139] PowerPC volatile VSX register live across call

2013-09-05 Thread meissner at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139

--- Comment #7 from Michael Meissner meissner at gcc dot gnu.org ---
FWIW, I was able to bootstrap subversion id 202295 on my x86_68 laptop running
RHEL 6.4, building c, c++, fortran languages, and using --enable-lto
--without-ppl --without-cloog.


[Bug c++/58328] New: [C++11] bogus: error: constructor required before non-static data member for

2013-09-05 Thread ppluzhnikov at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58328

Bug ID: 58328
   Summary: [C++11] bogus: error: constructor required before
non-static data member for
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ppluzhnikov at google dot com

Google ref: b/10634418

This appears to be very similar to PR 57770

Using g++ (GCC) 4.9.0 20130904 (experimental)

cat t.cc

struct A {
  struct B {
// B() {}  // Uncommenting this line makes it work.
int y = 1; // Removing initializer makes it work.
  };

  A(const B opts = B()) {}  // Removing default makes it work.
};


g++ -c t.cc -std=c++11
t.cc: In constructor 'A::B::B()':
t.cc:2:10: error: constructor required before non-static data member for
'A::B::y' has been parsed
   struct B {
  ^
t.cc: At global scope:
t.cc:7:23: note: synthesized method 'A::B::B()' first required here 
   A(const B opts = B()) {}
   ^


[Bug ipa/58329] New: [4.9 Regression] ld: Invalid symbol type for plabel (.libs/libstdc++.lax/libc++11convenience.a/system_error.o, std::error_category::default_error_condition(int) const [clone .loca

2013-09-05 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58329

Bug ID: 58329
   Summary: [4.9 Regression] ld: Invalid symbol type for plabel
(.libs/libstdc++.lax/libc++11convenience.a/system_erro
r.o, std::error_category::default_error_condition(int)
const [clone .localalias.9]).
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: danglin at gcc dot gnu.org
CC: hubicka at gcc dot gnu.org
  Host: hppa2.0w-hp-hpux11.11
Target: hppa2.0w-hp-hpux11.11
 Build: hppa2.0w-hp-hpux11.11

libtool: link: (cd .libs/libstdc++.lax/libc++11convenience.a  ar x
/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src/../src/c++11/.libs/libc++11convenience.a)
libtool: link:  /test/gnu/gcc/objdir/./gcc/xgcc -shared-libgcc
-B/test/gnu/gcc/objdir/./gcc -nostdinc++
-L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src
-L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src/.libs
-L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/libsupc++/.libs
-B/opt/gnu/gcc/gcc-4.9/hppa2.0w-hp-hpux11.11/bin/
-B/opt/gnu/gcc/gcc-4.9/hppa2.0w-hp-hpux11.11/lib/ -isystem
/opt/gnu/gcc/gcc-4.9/hppa2.0w-hp-hpux11.11/include -isystem
/opt/gnu/gcc/gcc-4.9/hppa2.0w-hp-hpux11.11/sys-include-shared -nostdlib
-fPIC -Wl,+h -Wl,libstdc++.sl.6 -Wl,+b -Wl,/opt/gnu/gcc/gcc-4.9/lib -o
.libs/libstdc++.sl.6.19   .libs/compatibility.o
.libs/compatibility-debug_list.o .libs/compatibility-debug_list-2.o
.libs/compatibility-c++0x.o .libs/compatibility-atomic-c++0x.o
.libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o
.libs/compatibility-condvar.o  
.libs/libstdc++.lax/libsupc++convenience.a/array_type_info.o
.libs/libstdc++.lax/libsupc++convenience.a/atexit_arm.o
.libs/libstdc++.lax/libsupc++convenience.a/atexit_thread.o
.libs/libstdc++.lax/libsupc++convenience.a/bad_alloc.o
.libs/libstdc++.lax/libsupc++convenience.a/bad_array_length.o
.libs/libstdc++.lax/libsupc++convenience.a/bad_array_new.o
.libs/libstdc++.lax/libsupc++convenience.a/bad_cast.o
.libs/libstdc++.lax/libsupc++convenience.a/bad_typeid.o
.libs/libstdc++.lax/libsupc++convenience.a/class_type_info.o
.libs/libstdc++.lax/libsupc++convenience.a/del_op.o
.libs/libstdc++.lax/libsupc++convenience.a/del_opnt.o
.libs/libstdc++.lax/libsupc++convenience.a/del_opv.o
.libs/libstdc++.lax/libsupc++convenience.a/del_opvnt.o
.libs/libstdc++.lax/libsupc++convenience.a/dyncast.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_alloc.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_arm.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_aux_runtime.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_call.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_catch.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_exception.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_globals.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_personality.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_ptr.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_term_handler.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_terminate.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_tm.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_throw.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_type.o
.libs/libstdc++.lax/libsupc++convenience.a/eh_unex_handler.o
.libs/libstdc++.lax/libsupc++convenience.a/enum_type_info.o
.libs/libstdc++.lax/libsupc++convenience.a/function_type_info.o
.libs/libstdc++.lax/libsupc++convenience.a/fundamental_type_info.o
.libs/libstdc++.lax/libsupc++convenience.a/guard.o
.libs/libstdc++.lax/libsupc++convenience.a/guard_error.o
.libs/libstdc++.lax/libsupc++convenience.a/hash_bytes.o
.libs/libstdc++.lax/libsupc++convenience.a/nested_exception.o
.libs/libstdc++.lax/libsupc++convenience.a/new_handler.o
.libs/libstdc++.lax/libsupc++convenience.a/new_op.o
.libs/libstdc++.lax/libsupc++convenience.a/new_opnt.o
.libs/libstdc++.lax/libsupc++convenience.a/new_opv.o
.libs/libstdc++.lax/libsupc++convenience.a/new_opvnt.o
.libs/libstdc++.lax/libsupc++convenience.a/pbase_type_info.o
.libs/libstdc++.lax/libsupc++convenience.a/pmem_type_info.o
.libs/libstdc++.lax/libsupc++convenience.a/pointer_type_info.o
.libs/libstdc++.lax/libsupc++convenience.a/pure.o
.libs/libstdc++.lax/libsupc++convenience.a/si_class_type_info.o
.libs/libstdc++.lax/libsupc++convenience.a/tinfo.o
.libs/libstdc++.lax/libsupc++convenience.a/tinfo2.o
.libs/libstdc++.lax/libsupc++convenience.a/vec.o
.libs/libstdc++.lax/libsupc++convenience.a/vmi_class_type_info.o
.libs/libstdc++.lax/libsupc++convenience.a/vterminate.o
.libs/libstdc++.lax/libsupc++convenience.a/cp-demangle.o 
.libs/libstdc++.lax/libc++98convenience.a/bitmap_allocator.o
.libs/libstdc++.lax/libc++98convenience.a/pool_allocator.o
.libs/libstdc++.lax/libc++98convenience.a/mt_allocator.o

[Bug target/58139] PowerPC volatile VSX register live across call

2013-09-05 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139

--- Comment #11 from Dominique d'Humieres dominiq at lps dot ens.fr ---
Boostrap with obj* completed successfully with r202295 reverted. I start again
with the patch in comment#9.


[Bug ipa/58329] [4.9 Regression] ld: Invalid symbol type for plabel (.libs/libstdc++.lax/libc++11convenience.a/system_error.o, std::error_category::default_error_condition(int) const [clone .localalia

2013-09-05 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58329

--- Comment #1 from Jan Hubicka hubicka at ucw dot cz ---
 Symbol has type data which is wrong for procedure label:
 
 Symbols from system_error.o:
 
   ValueInfo   Type  Scope ck HQIRCDSKLN xl reloc Name
 
   Data  Unsat  0 ..  3 0
 _ZNKSt14error_category23default_error_conditionEi.localalias.9

The code introduces the symbol as an static alias of function.
I.e. something like

void foo (void) { }
void foo.localalias (void) __attribute__ ((alias foo));

Can this be latent bug in HPPA backend not handling well aliases like this?
(this was indeed an issue on AIX).


[Bug ipa/58329] [4.9 Regression] ld: Invalid symbol type for plabel (.libs/libstdc++.lax/libc++11convenience.a/system_error.o, std::error_category::default_error_condition(int) const [clone .localalia

2013-09-05 Thread dave.anglin at bell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58329

--- Comment #2 from dave.anglin at bell dot net ---
On 5-Sep-13, at 7:31 PM, hubicka at ucw dot cz wrote:

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

 --- Comment #1 from Jan Hubicka hubicka at ucw dot cz ---
 Symbol has type data which is wrong for procedure label:

 Symbols from system_error.o:

  ValueInfo   Type  Scope ck HQIRCDSKLN xl reloc Name

   Data  Unsat  0 ..  3 0
 _ZNKSt14error_category23default_error_conditionEi.localalias.9

 The code introduces the symbol as an static alias of function.
 I.e. something like

 void foo (void) { }
 void foo.localalias (void) __attribute__ ((alias foo));

 Can this be latent bug in HPPA backend not handling well aliases  
 like this?
 (this was indeed an issue on AIX).


I wouldn't be surprised.

I don't have assembler output or preprocessed source yet.  There is  
some alias
support in gas for HP-UX but I believe it may not work when we have a  
call using
a function descriptor (plabel).

Dave
--
John David Anglindave.ang...@bell.net


[Bug c++/58201] [4.9 Regression] Undefined reference to `B::B(void const**)'

2013-09-05 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58201

Jan Hubicka hubicka at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #11 from Jan Hubicka hubicka at gcc dot gnu.org ---
Fixed.


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

2013-09-05 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375

--- Comment #195 from Jan Hubicka hubicka at ucw dot cz ---
Today there was two fixes for bugs that produce undefined symbols like one you
see.
Does the problem still exist on current mainline?  Are you using profile
feedback?


[Bug target/56726] i386: MALLOC_ABI_ALIGNMENT is too small (usually)

2013-09-05 Thread chip at pobox dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56726

--- Comment #7 from Chip Salzenberg chip at pobox dot com ---
Should this ticket have status CONFIRMED ? Also I suspect it's been fixed in
trunk...


[Bug tree-optimization/58318] very slow compilation on x86_64-linux with -O3 and -g and checking enabled

2013-09-05 Thread su at cs dot ucdavis.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58318

--- Comment #2 from Zhendong Su su at cs dot ucdavis.edu ---
 did you compare trunk with --enable-checking=release?  

Richard, you are right. Below is my 4.8 config: 

$ gcc-4.8 -v
Using built-in specs.
COLLECT_GCC=gcc-4.8
COLLECT_LTO_WRAPPER=/usr/local/gcc-4.8/libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.8.1/configure
--enable-languages=c,c++,objc,obj-c++,fortran,lto --disable-checking
--with-gmp=/usr/local/gcc-4.8 --with-mpfr=/usr/local/gcc-4.8
--with-mpc=/usr/local/gcc-4.8 --with-cloog=/usr/local/gcc-4.8
--prefix=/usr/local/gcc-4.8
Thread model: posix
gcc version 4.8.1 (GCC) 
$


[Bug target/58139] PowerPC volatile VSX register live across call

2013-09-05 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58139

--- Comment #9 from H.J. Lu hjl.tools at gmail dot com ---
You can try this:

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index a8d70bc..ab4dc6c 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -34466,7 +34466,7 @@ ix86_hard_regno_mode_ok (int regno, enum machine_mode
mode)

   /* OImode move is available only when AVX is enabled.  */
   return ((TARGET_AVX  mode == OImode)
-  || VALID_AVX256_REG_MODE (mode)
+  || (TARGET_AVX  VALID_AVX256_REG_MODE (mode))
   || VALID_SSE_REG_MODE (mode)
   || VALID_SSE2_REG_MODE (mode)
   || VALID_MMX_REG_MODE (mode)


[Bug c++/58201] [4.9 Regression] Undefined reference to `B::B(void const**)'

2013-09-05 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58201

--- Comment #10 from Jan Hubicka hubicka at gcc dot gnu.org ---
Author: hubicka
Date: Thu Sep  5 23:04:11 2013
New Revision: 202298

URL: http://gcc.gnu.org/viewcvs?rev=202298root=gccview=rev
Log:

PR middle-end/58201
* cgraphunit.c (analyze_functions): Clear AUX fields
after processing; initialize assembler name has.

* g++.dg/torture/pr58201_0.C: New testcase.
* g++.dg/torture/pr58201_1.C: New testcase.
* g++.dg/torture/pr58201.h: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/torture/pr58201.h
trunk/gcc/testsuite/g++.dg/torture/pr58201_0.C
trunk/gcc/testsuite/g++.dg/torture/pr58201_1.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cgraphunit.c
trunk/gcc/testsuite/ChangeLog


[Bug rtl-optimization/54585] stack space allocated but never used when calling functions that return structs in registers

2013-09-05 Thread chip at pobox dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54585

--- Comment #1 from Chip Salzenberg chip at pobox dot com ---
I'd like to suggest this ticket be at least CONFIRMED what with the code
samples in the ticket.

What will it take to fix this?


[Bug c++/58328] [C++11] bogus: error: constructor required before non-static data member for

2013-09-05 Thread richard-gccbugzilla at metafoo dot co.uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58328

Richard Smith richard-gccbugzilla at metafoo dot co.uk changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org,
   ||richard-gccbugzilla@metafoo
   ||.co.uk

--- Comment #3 from Richard Smith richard-gccbugzilla at metafoo dot co.uk ---
This is in the area of a core language defect, and IIRC CWG hasn't really
decided which cases should be valid. Clang accepts the code in comment#2 but
rejects the code in comment#0 because, in comment#0, 'A::B::B()' is constexpr,
so Clang triggers the computation of the implicit exception specification of
'A::B::B()' earlier (before the default initializer for 'A::B::y' is parsed).

It seems that g++ more eagerly computes the exception specification for
'A::B::B()'. That seems more in line with the resolution of core issue 1330,
which suggests to me that we should trigger the computation of the exception
specification when we parse the 'B()' expression, so I'm inclined to say that
Clang is in error in accepting the code in comment#2.


[Bug c++/24702] Koenig found functoid ref, but cannot be used as a function

2013-09-05 Thread pierhyth at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24702

--- Comment #9 from Mark Phillips pierhyth at gmail dot com ---
Thanks Jonathan for the information on the updated standard and the rationale
behind restricting Koenig to actual functions and function templates.

In one way it is a bit of a pity - it does make functors second-class citizens
compared to functions - but the linked document explains some additional
considerations, namely the risk of over-visibility of names.  Perhaps it is a
reasonable choice for now.  Hopefully a better solution will be introduced down
the track (maybe extending it to functors, while at the same time
narrowing/allowing-control-over namespaces to be looked up).


[Bug c++/28107] Incomplete type in struct added to global namespace

2013-09-05 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28107

--- Comment #5 from Jonathan Wakely redi at gcc dot gnu.org ---
Yes, this is invalid, a member definition such as union B b; does not declare
a nested type, that would be:

struct A {
union B;
B b;
};


[Bug rtl-optimization/54585] stack space allocated but never used when calling functions that return structs in registers

2013-09-05 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54585

Eric Botcazou ebotcazou at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-09-05
 CC||ebotcazou at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Eric Botcazou ebotcazou at gcc dot gnu.org ---
It's quite hard because the frame is laid out way before all the memory
accesses to the stack slots are optimized away.  My personal take is that it's
not worth the hassle, but I'm ready to be proved wrong.


[Bug tree-optimization/58326] New: ICE in check_loop_closed_ssa_use, at tree-ssa-loop-manip.c:551

2013-09-05 Thread su at cs dot ucdavis.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58326

Bug ID: 58326
   Summary: ICE in check_loop_closed_ssa_use, at
tree-ssa-loop-manip.c:551
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu

The following code causes an ICE when compiled with the current gcc trunk at
-O2 and -O3 on x86_64-linux (both 32-bit and 64-bit modes). 

This is a regression from 4.8.x.


$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure
--enable-languages=c,c++,objc,obj-c++,fortran,lto
--with-gmp=/usr/local/gcc-trunk --with-mpfr=/usr/local/gcc-trunk
--with-mpc=/usr/local/gcc-trunk --with-cloog=/usr/local/gcc-trunk
--prefix=/usr/local/gcc-trunk
Thread model: posix
gcc version 4.9.0 20130905 (experimental) [trunk revision 202269] (GCC) 
$ gcc-trunk -O1 -c small.c
$ gcc-4.8 -O2 -c small.c  
$ gcc-trunk -O2 -c small.c
small.c: In function ‘foo’:
small.c:5:6: internal compiler error: in check_loop_closed_ssa_use, at
tree-ssa-loop-manip.c:551
 void foo ()
  ^
0xa25746 check_loop_closed_ssa_use
../../gcc-trunk/gcc/tree-ssa-loop-manip.c:550
0xa2717c check_loop_closed_ssa_stmt
../../gcc-trunk/gcc/tree-ssa-loop-manip.c:566
0xa2717c verify_loop_closed_ssa(bool)
../../gcc-trunk/gcc/tree-ssa-loop-manip.c:600
0xdc61d8 tree_unroll_loops_completely(bool, bool)
../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.c:1239
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.
$ 


-


int a, *d; 
long b;
short c;

void foo ()
{
  int e;
 lbl:
  for (c = 0; c  2; c++)
{
  if (1  b)
break;
  e = *d;
  for (; a; a++)
{
  *d = e;
  if (b)
goto lbl;
}
}
}

[Bug bootstrap/58242] [4.9 regression] linux-android.c:40:7: error: 'OPTION_BIONIC' was not declared in this scope breaks bootstrap on powerpc64-linux

2013-09-05 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58242

Mikael Pettersson mikpe at it dot uu.se changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Mikael Pettersson mikpe at it dot uu.se ---
Yes, bootstrap is restored on powerpc64-linux with trunk @ 202274.  Closing.


[Bug c++/58325] Spurious unused-but-set-variable warning on delete[] of volatile pointer

2013-09-05 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58325

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-09-05
 CC||jakub at gcc dot gnu.org
 Ever confirmed|0   |1


[Bug middle-end/58330] New: powerpc64 atomic store split in two

2013-09-05 Thread anton at samba dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58330

Bug ID: 58330
   Summary: powerpc64 atomic store split in two
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: anton at samba dot org

We found an issue when building the powerpc64 little endian kernel where a 64
bit store was split into two 32 bit stores. Since there is no 64 bit byte
reversed store on POWER6 and earlier, gcc decided to use two 32 bit byte
reversed stores. We were unable to fix this, even with atomic builtins.

I think splitting the store even in the non atomic builtin case is suspect
since we have lots of places in the kernel that rely on naturally aligned loads
and stores being done atomically.

An example:

static inline void __raw_writeq (unsigned long v, void *addr)
{
#if 1
__atomic_store_n ((unsigned long *) addr, v, __ATOMIC_RELAXED);
#else
*(volatile unsigned long *)addr = v;
#endif
}

void foo (void *addr, unsigned long start)
{
unsigned long reverse = __builtin_bswap64 (start);
__raw_writeq (reverse, addr);
}

gives:

li 9,4
srdi 10,4,32
stwbrx 4,0,3
stwbrx 10,9,3


[Bug target/58330] powerpc64 atomic store split in two

2013-09-05 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58330

Andrew Pinski pinskia at gcc dot gnu.org changed:

   What|Removed |Added

 Target||powerpc64*-linux
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-09-06
  Component|middle-end  |target
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski pinskia at gcc dot gnu.org ---
I think the rs6000 back-end should follow what aarch64 does with respect of the
atomic stores and don't use a standard movdi pattern but have an atomic store
pattern instead.


[Bug target/58330] powerpc64 atomic store split in two

2013-09-05 Thread amodra at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58330

Alan Modra amodra at gmail dot com changed:

   What|Removed |Added

 CC||amodra at gmail dot com

--- Comment #2 from Alan Modra amodra at gmail dot com ---
I think this is a backend problem, specifically with bswapdi2_64bit accepting a
DImode mem then splitting to two SImode.

Potential fix is to add
!(MEM_P (operands[0])  MEM_VOLATILE_P (operands[0]))
!(MEM_P (operands[1])  MEM_VOLATILE_P (operands[1]))
to the insn condition.