[Bug middle-end/57370] [4.9 Regression] compiler hangs in reassoc

2013-06-13 Thread Joost.VandeVondele at mat dot ethz.ch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57370

--- Comment #7 from Joost VandeVondele Joost.VandeVondele at mat dot ethz.ch 
---
Since the bug is still 'unconfirmed', I'm wondering if this can not be
reproduced, or if I can provide some more information (more than the small
testcase in comment #6 and the revision that caused it in comment #2) ?


[Bug c++/57599] result of dynamic_castcv T is just T

2013-06-13 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57599

Daniel Krügler daniel.kruegler at googlemail dot com changed:

   What|Removed |Added

 CC||daniel.kruegler@googlemail.
   ||com

--- Comment #4 from Daniel Krügler daniel.kruegler at googlemail dot com ---
I created a test case for all type conversion operators:

struct A {};
struct B : public A {};

templateclass, class
struct is_same { static constexpr bool value = false; };

templateclass T
struct is_sameT, T { static constexpr bool value = true; };

templateclass T
T val();

static_assert(is_samedecltype(static_castconst A*(valB*())), const
A*::value, Ouch);
static_assert(is_samedecltype(static_castconst A(valB())), const
A::value, Ouch);

static_assert(is_samedecltype(const_castconst A*(valA*())), const
A*::value, Ouch);
static_assert(is_samedecltype(const_castconst A(valA())), const
A::value, Ouch);

static_assert(is_samedecltype(reinterpret_castconst A*(valB*())), const
A*::value, Ouch);
static_assert(is_samedecltype(reinterpret_castconst A(valB())), const
A::value, Ouch);

static_assert(is_samedecltype(dynamic_castconst A*(valB*())), const
A*::value, Ouch); // Error!
static_assert(is_samedecltype(dynamic_castconst A(valB())), const
A::value, Ouch); // Error!

In agreement with that bug report I see failures for the last two even for gcc
4.9.0 20130609 (experimental)

[Bug fortran/57596] select type bug with optional variables?

2013-06-13 Thread valeryweber at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57596

--- Comment #2 from Valery Weber valeryweber at hotmail dot com ---
But the selector is not optional. The problem even remains if I 
move the optional variables outside the SELECT TYPE (see bellow).
Those 2 codes run just fine with other compilers like ifort or xlf.
Thanks
Valery


MODULE base_types
  TYPE :: base_integer_type
 INTEGER :: i
  END TYPE base_integer_type
  TYPE :: base_character_type
 CHARACTER( 10 ) :: c
  END TYPE base_character_type
END MODULE base_types

PROGRAM main
  USE base_types
  IMPLICIT NONE
  INTEGER::i_val
  call get (  i_val=i_val )
  write(*,*) 'i_val',i_val
contains

  SUBROUTINE get (i_val, c_val)
INTEGER, INTENT( OUT ), OPTIONAL :: i_val
CHARACTER( : ), INTENT( OUT ), ALLOCATABLE, OPTIONAL :: c_val
CLASS( * ), POINTER :: p
TYPE( base_integer_type ),target :: i_base
INTEGER :: i_val_tmp
CHARACTER( 10 ) :: c_val_tmp
i_base%i=-12
p=i_base
SELECT TYPE( p )
TYPE IS( base_integer_type )
   i_val_tmp = p%i
TYPE IS( base_character_type )
   c_val_tmp = p%c
CLASS DEFAULT
   stop
END SELECT
IF(present(i_val)) i_val = i_val_tmp
if(present(c_val)) c_val = c_val_tmp
  END SUBROUTINE get
END PROGRAM main


[Bug c++/57599] result of dynamic_castcv T is just T

2013-06-13 Thread abel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57599

--- Comment #5 from Andrey Belevantsev abel at gcc dot gnu.org ---
(In reply to Daniel Krügler from comment #4)
 I created a test case for all type conversion operators:

Paolo has already submitted a patch with the expanded test case at
http://gcc.gnu.org/ml/gcc-patches/2013-06/msg00760.html/

[Bug tree-optimization/57601] New: Vector lowering could use larger modes

2013-06-13 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57601

Bug ID: 57601
   Summary: Vector lowering could use larger modes
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: glisse at gcc dot gnu.org
Target: x86_64-linux-gnu

typedef int vec __attribute__((vector_size(2*sizeof(int;
vec f(vec a, vec b){
  return a-b;
}

vmovq%xmm0, %rcx
vmovq%xmm1, %rdx
movl%ecx, %eax
shrq$32, %rcx
subl%edx, %eax
shrq$32, %rdx
subl%edx, %ecx
vmovd%eax, %xmm2
vpinsrd$1, %ecx, %xmm2, %xmm0

(with -Ofast -mavx2) whereas if I change the size to 4, I get:

vpsubd%xmm1, %xmm0, %xmm0

which seems valid to me even for size 2. It is not clear to me how to model
that at tree level, maybe it would be easier to just implement V2SI operations
in the backend?


[Bug regression/57551] [4.9 Regression]: g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE

2013-06-13 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57551

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||fche at redhat dot com,
   ||jakub at gcc dot gnu.org

--- Comment #12 from Jakub Jelinek jakub at gcc dot gnu.org ---
In particular, the problem is that we used to have a hacked up version of
svnmailer, which created the special emails for bugzilla, now the server has a
new upstream version of svnmailer and these hacks weren't ported to it.


[Bug target/57601] Vector lowering could use larger modes

2013-06-13 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57601

Andrew Pinski pinskia at gcc dot gnu.org changed:

   What|Removed |Added

  Component|tree-optimization   |target

--- Comment #1 from Andrew Pinski pinskia at gcc dot gnu.org ---
Aren't xmm0 MMX registers which means they overlap with the floating point
registers in some cases and that also means you need to use emms instructions?


[Bug lto/57602] New: Runfails for several C/C++ benchmarks from spec2000 for i686 with -flto after r199422

2013-06-13 Thread izamyatin at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57602

Bug ID: 57602
   Summary: Runfails for several C/C++ benchmarks from spec2000
for i686 with -flto after r199422
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: izamyatin at gmail dot com
CC: jh at suse dot cz
Target: i686

For instance, 164.gzip has Segmentation fault. (tried on trunk, revision
200055)

Compiler options

-m32 -Ofast -flto -funroll-loops -msse2 -mfpmath=sse.


[Bug fortran/45170] [F2003] allocatable character lengths

2013-06-13 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45170

Bug 45170 depends on bug 57596, which changed state.

Bug 57596 Summary: Wrong code for allocatable deferred-length strings
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57596

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |---


[Bug fortran/57596] Wrong code for allocatable deferred-length strings

2013-06-13 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57596

Tobias Burnus burnus at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|RESOLVED|REOPENED
   Last reconfirmed||2013-06-13
 Blocks||45170
 Resolution|INVALID |---
Summary|select type bug with|Wrong code for allocatable
   |optional variables? |deferred-length strings
 Ever confirmed|0   |1

--- Comment #3 from Tobias Burnus burnus at gcc dot gnu.org ---
REOPEN

PROGRAM main
  IMPLICIT NONE
  call get ()
contains
  SUBROUTINE get (c_val)
CHARACTER( : ), INTENT( OUT ), ALLOCATABLE, OPTIONAL :: c_val
CHARACTER( 10 ) :: c_val_tmp
if(present(c_val)) c_val = c_val_tmp
  END SUBROUTINE get
END PROGRAM main


[Bug tree-optimization/57370] [4.9 Regression] compiler hangs in reassoc

2013-06-13 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57370

Marc Glisse glisse at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-06-13
  Component|middle-end  |tree-optimization
 Ever confirmed|0   |1

--- Comment #8 from Marc Glisse glisse at gcc dot gnu.org ---
Confirmed.


[Bug target/57601] Vector lowering could use larger modes

2013-06-13 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57601

--- Comment #2 from Marc Glisse glisse at gcc dot gnu.org ---
With this code:

#include mmintrin.h
__m64 f(__m64 x, __m64 y){return _mm_sub_pi32(x,y);}

I get (-m64):

movdq2q%xmm0, %mm0
movdq2q%xmm1, %mm1
psubd%mm1, %mm0
movq2dq%mm0, %xmm0

and (-m32):

psubd%mm1, %mm0


[Bug c++/49718] please allow no_instrument_function attribute in class member definition/declaration

2013-06-13 Thread a...@cloudius-systems.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49718

Avi Kivity a...@cloudius-systems.com changed:

   What|Removed |Added

 CC||a...@cloudius-systems.com

--- Comment #1 from Avi Kivity a...@cloudius-systems.com ---
Seeing this too.


[Bug tree-optimization/57600] Turn 2 comparisons into 1 with the min

2013-06-13 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57600

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-06-13
 Blocks||53947
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
Confirmed.  We have tree-ssa-if-combine.c that has various ways to combine
ed and ||ed comparisons.  This transform would be a useful addition.


[Bug libstdc++/56430] In __airy: return-statement with a value, in function returning 'void'.

2013-06-13 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56430

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |4.9.0

--- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com ---
Fixed for 4.9.0.


[Bug tree-optimization/57600] Turn 2 comparisons into 1 with the min

2013-06-13 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57600

--- Comment #2 from Marc Glisse glisse at gcc dot gnu.org ---
The main difficulty is deciding when this transformation is a good idea. A
priori abac can be faster than amin(b,c). Good cases:
- if there is a min insn (like minsd for double on x86_64, but that might
require finite-math-only);
- if we are in a loop and b and c are invariants (not sure ifcombine is the
right place for that).

Or do we want to do the transformation always, and maybe have something later
(in RTL?) to undo it if it didn't help?

Note that in some experiments with more meat in the loop, having imin(n1,n2)
made the compiler not see a dominating in1 anymore and it lost some
optimizations.


[Bug bootstrap/57603] New: Bootstrap fail on s390x segfault in fold_marked_statements

2013-06-13 Thread krebbel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57603

Bug ID: 57603
   Summary: Bootstrap fail on s390x segfault in
fold_marked_statements
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: krebbel at gcc dot gnu.org

Created attachment 30300
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30300action=edit
delta minimized testcase

cc1 -fpreprocessed -quiet -march=z9-109  -O1 t.c

Program received signal SIGSEGV, Segmentation fault.
0x805c3b22 in fold_marked_statements(int, pointer_set_t*) ()
(gdb) bt
#0  0x805c3b22 in fold_marked_statements(int, pointer_set_t*) ()
#1  0x805d258c in optimize_inline_calls(tree_node*) ()
#2  0x80900c82 in inline_transform(cgraph_node*) ()
#3  0x804b7b86 in execute_all_ipa_transforms() ()
#4  0x80234da6 in expand_function(cgraph_node*) ()
#5  0x80236e68 in compile() ()
#6  0x80237460 in finalize_compilation_unit() ()
#7  0x800f3740 in c_write_global_declarations() ()
#8  0x80568694 in compile_file() ()
#9  0x8056a84c in toplev_main(int, char**) ()
#10 0x03fffdc99088 in __libc_start_main (main=0x800d53ac main,
argc=optimized out, 
ubp_av=0x3fff258, init=optimized out, fini=0x809ee1f8
__libc_csu_fini, 
rtld_fini=0x3fffdfed8f4 _dl_fini, stack_end=0x3fff1a0) at
libc-start.c:226
#11 0x800d5412 in _start ()


[Bug bootstrap/57603] Bootstrap fail on s390x segfault in fold_marked_statements

2013-06-13 Thread krebbel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57603

--- Comment #1 from Andreas Krebbel krebbel at gcc dot gnu.org ---
The failure above was observed with r200057. Here the cc1 output:

cc1 -fpreprocessed -quiet -march=z9-109  -O1 t.c

t.c: In function ‘d_append_string’:
t.c:22:38: warning: incompatible implicit declaration of built-in function
‘strlen’ [enabled by default]
 d_append_buffer (dpi, s, strlen (s));
  ^
t.c: In function ‘d_demangle_callback’:
t.c:41:102: warning: incompatible implicit declaration of built-in function
‘strlen’ [enabled by default]
 else if ((__extension__ (__builtin_constant_p (8) 
((__builtin_constant_p (mangled)  strlen (mangled)  ((size_t) (8))) ||
(__builtin_constant_p (_GLOBAL_)  strlen (_GLOBAL_)  ((size_t) (8 ?
__extension__ ({
   
  ^
t.c: In function ‘__gcclibcxx_demangle_callback’:
t.c:60:15: internal compiler error: Segmentation fault
   int __gcclibcxx_demangle_callback (const char *mangled_name,
   void (*callback) (const char *, size_t, void *),
   void *opaque) {
   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.

[Bug bootstrap/57604] New: LRA related bootstrap comparison failure on s390x --with-arch=zEC12

2013-06-13 Thread krebbel at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57604

Bug ID: 57604
   Summary: LRA related bootstrap comparison failure on s390x
--with-arch=zEC12
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: krebbel at gcc dot gnu.org

Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Bootstrap comparison failure!
gcc/tree-ssa-loop-im.o differs

stage2:

.align2
.type_ZZN19ref_always_accessedclEP11mem_ref_locE12__FUNCTION__, @object
.size_ZZN19ref_always_accessedclEP11mem_ref_locE12__FUNCTION__, 11
_ZZN19ref_always_accessedclEP11mem_ref_locE12__FUNCTION__:
.stringoperator()

stage3:

.align2
.type_ZZN19ref_always_accessedclEP11mem_ref_locE12__FUNCTION__, @object
.size_ZZN19ref_always_accessedclEP11mem_ref_locE12__FUNCTION__, 12
_ZZN19ref_always_accessedclEP11mem_ref_locE12__FUNCTION__:
.stringoperator ()


Be aware of the additional blank in the string. This does not happen when
disabling LRA for bootstrap.


[Bug target/55033] [4.7/4.8/4.9 Regression] PowerPC section type conflict error

2013-06-13 Thread sebastian.hu...@embedded-brains.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55033

--- Comment #9 from Sebastian Huber sebastian.hu...@embedded-brains.de ---
If I run the tests on gcc1-power7.osuosl.org (which is target
powerpc64-unknown-linux-gnu), then the PR55033 test case shows up as
UNSUPPORTED:

grep -r pr55033 .
./gcc/testsuite/gcc/gcc.sum:UNSUPPORTED: gcc.target/powerpc/pr55033.c
./gcc/testsuite/gcc/gcc.log:UNSUPPORTED: gcc.target/powerpc/pr55033.c
./gcc/testsuite/gcc11/gcc.log.sep:UNSUPPORTED: gcc.target/powerpc/pr55033.c
./gcc/testsuite/gcc11/gcc.sum.sep:UNSUPPORTED: gcc.target/powerpc/pr55033.c


[Bug fortran/57596] Wrong code for allocatable deferred-length strings

2013-06-13 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57596

--- Comment #4 from Tobias Burnus burnus at gcc dot gnu.org ---
Patch: http://gcc.gnu.org/ml/fortran/2013-06/msg00082.html


[Bug tree-optimization/57600] Turn 2 comparisons into 1 with the min

2013-06-13 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57600

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek jakub at gcc dot gnu.org ---
Perhaps we want to perform it just during ifcvt once it is rolled into
vectorizer and works on an on-the-side bb?  Then it wouldn't affect
non-vectorized code.


[Bug tree-optimization/57600] Turn 2 comparisons into 1 with the min

2013-06-13 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57600

--- Comment #4 from Marc Glisse glisse at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #3)
 Perhaps we want to perform it just during ifcvt once it is rolled into
 vectorizer and works on an on-the-side bb?  Then it wouldn't affect
 non-vectorized code.

We would miss some useful cases (in the original testcase, the transformation
is worth it even without vectorizing), but at least it would make regressions
unlikely...


[Bug c++/27557] OpenMP threadprivate directive does not work with non-POD types

2013-06-13 Thread siddhesh at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27557

Siddhesh Poyarekar siddhesh at redhat dot com changed:

   What|Removed |Added

 CC||siddhesh at redhat dot com

--- Comment #11 from Siddhesh Poyarekar siddhesh at redhat dot com ---
I had added __cxa_thread_atexit_impl to glibc earlier this year to support
c++11 thread_local destructors[1][2].  Wouldn't that be good enough support
from glibc for openmp too?

[1]
http://sourceware.org/glibc/wiki/Destructor%20support%20for%20thread_local%20variables
[2]
http://sourceware.org/git/?p=glibc.git;a=commit;h=ba384f6ed9275f3966505f2375b56d169e3dc588


[Bug preprocessor/57580] Repeated _Pragma message directives in macro causes problems

2013-06-13 Thread jasonwucj at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57580

Chung-Ju Wu jasonwucj at gmail dot com changed:

   What|Removed |Added

 CC||jasonwucj at gmail dot com

--- Comment #2 from Chung-Ju Wu jasonwucj at gmail dot com ---
I tested on 4.7.3 and 4.8.0 with my target porting:


[test.c]
---8---8---8---8---8---8---
#define BROKEN\
  _Pragma(message(\message0\))\
  _Pragma(message(\message1\))

BROKEN
---8---8---8---8---8---8---


[4.7.3]
$ nds32le-elf-gcc --version
nds32le-elf-gcc (2013-06-04 nds32le-elf-newlib-v3) 4.7.3
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ nds32le-elf-gcc test.c -c
test.c:5:1: note: #pragma message: message0
test.c:5:1: note: #pragma message: message1


[4.8.0]
$ nds32le-elf-gcc --version
nds32le-elf-gcc (2013-06-13 nds32le-elf-newlib-v3) 4.8.0
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ nds32le-elf-gcc test.c -c
test.c:5:1: note: #pragma message: message0
 BROKEN
 ^
test.c:5:1: note: #pragma message: message1


[Bug testsuite/57605] New: colors break note pruning in the testsuite

2013-06-13 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57605

Bug ID: 57605
   Summary: colors break note pruning in the testsuite
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: glisse at gcc dot gnu.org

Hello,

I set GCC_COLORS in my .profile, and since then (roughly) I get many excess
error failures in the libstdc++ testsuite. My guess is that it breaks:

# Ignore informational notes.
regsub -all (^|\n)\[^\n\]*: note: \[^\n\]* $text  text

Maybe the testsuite could explicitly disable colors?


[Bug lto/57602] Runfails for several C/C++ benchmarks from spec2000 for i686 with -flto after r199422

2013-06-13 Thread ysrumyan at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57602

Yuri Rumyantsev ysrumyan at gmail dot com changed:

   What|Removed |Added

 CC||ysrumyan at gmail dot com

--- Comment #1 from Yuri Rumyantsev ysrumyan at gmail dot com ---
We also got a lot of run-time failures on eembc2.0 if it was compiled with -O3
-flto since wrong argument passing for clone (local) function:

before the fix we have

8048f7d:b8 a0 a8 10 08   mov$0x810a8a0,%eax
 8048f82:e8 19 5d 00 00   call   804eca0 set_cmd_line.lto_priv.21

i.e. argument is passed in AX register.
after fix we have

8048f7d:c7 04 24 a0 a8 10 08 movl   $0x810a8a0,(%esp)
 8048f84:e8 87 5c 00 00   call   804ec10 set_cmd_line.lto_priv.21

i.e. argument is passed on stack but function assumes that it is on register.

Note also that incremental fix proposed by Richard did not help.


[Bug preprocessor/57580] Repeated _Pragma message directives in macro causes problems

2013-06-13 Thread drussel at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57580

--- Comment #3 from Daniel Russel drussel at gmail dot com ---
It looks like I confused something along the way of trying to produce a simple
example. I'll revisit it on my end. Sorry.


[Bug preprocessor/57580] Repeated _Pragma message directives in macro causes problems

2013-06-13 Thread drussel at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57580

--- Comment #4 from Daniel Russel drussel at gmail dot com ---
Here we go. Sorry again.

drussel@flute:/tmp gcc -c test.cpp 
test.cpp:8:2: error: stray ‘#’ in program
test.cpp:8:27: note: #pragma message: message0
test.cpp:8:3: error: ‘pragma’ does not name a type
drussel@flute:/tmp cat test.cpp 
#define INNER \
 _Pragma(message(\message0\))

#define BROKEN\
INNER \
 _Pragma(message(\message1\))

BROKEN
drussel@flute:/tmp gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.7.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --disable-build-with-cxx
--disable-build-poststage1-with-cxx --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-linker-hash-style=gnu
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin
--enable-initfini-array --enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch_32=i686
--build=x86_64-redhat-linux
Thread model: posix
gcc version 4.7.2 20121109 (Red Hat 4.7.2-8) (GCC) 


It works fine on 4.4 and 4.6 at least.

[Bug target/55033] [4.7/4.8/4.9 Regression] PowerPC section type conflict error

2013-06-13 Thread segher at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55033

Segher Boessenkool segher at gcc dot gnu.org changed:

   What|Removed |Added

 CC||segher at gcc dot gnu.org

--- Comment #10 from Segher Boessenkool segher at gcc dot gnu.org ---
The testcase needs to add -meabi to fix #8.

Wrt #9: it seems you only tested 64-bit mode, -meabi is supported
only in 32-bit mode.


[Bug c++/56746] [4.8 regression] increased memory usage when compiling C++

2013-06-13 Thread mathias at gaunard dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56746

--- Comment #11 from Mathias Gaunard mathias at gaunard dot com ---
4.8.1 is still affected by this.

I wouldn't say it's NOTABUG if a new diagnostic feature enabled by default
increases memory consumption by 50%, even when no diagnostic is emitted.

I cannot easily give a test case; the problem being preprocessor-related, the
issues disappear once preprocessed.

The code incriminated includes hundreds of files (if not more), split in about
20 different include directories. Those files contain templates instantiated
hundreds of times each, and their body is generated by macros which may end up
creating lines that are thousands of characters long.


[Bug c++/56746] [4.8 regression] increased memory usage when compiling C++

2013-06-13 Thread mathias at gaunard dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56746

--- Comment #12 from Mathias Gaunard mathias at gaunard dot com ---
This may be considered a duplicate of #53525, though that bug is more focused
on performance than memory usage.


[Bug preprocessor/53525] Performance regression due to enabling track-macro-expansion

2013-06-13 Thread mathias at gaunard dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53525

Mathias Gaunard mathias at gaunard dot com changed:

   What|Removed |Added

 CC||mathias at gaunard dot com

--- Comment #16 from Mathias Gaunard mathias at gaunard dot com ---
I opened bug #56746 a while ago which is somewhat related to this.
ftrack-macro-expansion is causing 50% increased memory usage in my case (C++
code with heavy usage of macros and templates).

Please also consider memory usage and not just performance.


[Bug testsuite/57605] colors break note pruning in the testsuite

2013-06-13 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57605

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek jakub at gcc dot gnu.org ---
gcc/testsuite/lib/prune.exp adds -fdiagnostics-color=never to options, if
libstdc++ doesn't source that tcl file, but uses something different, perhaps
it needs to be tweaked similarly.


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

2013-06-13 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49074

Tobias Burnus burnus at gcc dot gnu.org changed:

   What|Removed |Added

 CC||burnus at gcc dot gnu.org

--- Comment #12 from Tobias Burnus burnus at gcc dot gnu.org ---
Author: mikael
Date: Thu Jun 13 14:26:47 2013
New Revision: 200069

URL: http://gcc.gnu.org/viewcvs?rev=200069root=gccview=rev
Log:
fortran/
PR fortran/49074
* trans-expr.c (gfc_conv_variable): Don't walk the reference chain.
Handle NULL array references.
(gfc_conv_procedure_call): Remove code handling NULL array references.

testsuite/
PR fortran/49074
* gfortran.dg/typebound_assignment_5.f03: New.


Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog

Author: mikael
Date: Thu Jun 13 14:30:17 2013
New Revision: 200070

URL: http://gcc.gnu.org/viewcvs?rev=200070root=gccview=rev
Log:
Commit forgotten file

Added:
trunk/gcc/testsuite/gfortran.dg/typebound_assignment_5.f03


[Bug testsuite/57606] New: Failure in testing stage 3 of gcc-4.7.2

2013-06-13 Thread ExtraLeveLInSoftware at ntlworld dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57606

Bug ID: 57606
   Summary: Failure in testing stage 3 of gcc-4.7.2
   Product: gcc
   Version: 4.7.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ExtraLeveLInSoftware at ntlworld dot com

1 Introduction

Trying to test recently built gcc-4.7.2.

Running Mac OS X:

 System Version:Mac OS X 10.5.8 (9L30)
 Kernel Version:Darwin 9.8.0
 uname -mpv
 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009;
root:xnu-1228.15.4~1/RELEASE_I386 i386 i386

This bug report concerns the following point.

  - An error reported by make testing stage 3, concerning ada acats

Background information about the state of the build is given.  Further
information about the reason for the failure had been determined, with the
effect of circumventing the problem.  See also Summary of Bug below for the
actual reason for the problem.


2 Report from configure etc.

The existing compilation system for stage 1 was obtained as a
ready built version of ada-4.3 in /usr/local/ada-4.3/bin/ (however, it
reports that it is 4.4.0)

bash gcc --version
gcc (GCC) 4.4.0 20080314 (experimental) [trunk revision 133226]
Copyright (C) 2008 Free Software Foundation, Inc.

Building in /Gnu/gcc/obj.  Sources in /Gnu/gcc/src/gcc-4.7.2/.

The configure command was
../src/gcc-4.7.2/gcc-4.7.2/configure --enable-languages=ada,c,c++ 

This completed OK.


3 An error reported by make check

Ran in /Gnu/gcc/obj/:
make -k check  ../logs/makechk-1.log

The make check failed, with messages described below.
First few lines of makechk-1log:
autogen -T ../../src/gcc-4.7.2/fixincludes/check.tpl
../../src/gcc-4.7.2/fixincludes/inclhack.def
make[2]: autogen: Command not found
make[2]: *** [check] Error 127
make[1]: *** [check-fixincludes] Error 2

Last few lines of makechk-1log:
make[3]: Target `check-am' not remade because of errors.
make[2]: *** [check-recursive] Error 1
make[2]: Target `check' not remade because of errors.
make[1]: *** [check-target-libitm] Error 2
make[1]: Target `check-target' not remade because of errors.
make: *** [do-check] Error 2
make: Target `check' not remade because of errors.

The log has quite a lot of Errors, but there are many passes in various
sections.  As suggested, many failures involve libitm (see Information about
the
build state below).
=== libitm Summary ===

# of expected passes1
# of unexpected failures14
# of unresolved testcases14
# of unsupported tests1

In the gnat tests, the summary has:
# of expected passes1109
# of expected failures14
# of unsupported tests4

But in the ada acats.log there are many messages:
i686-apple-darwin9-gcc-4.0.1: language ada not recognized
and nothing was compiled.  Final message:
 Failed to compile macrosub
this was also in the .sum file.

The makechk-1.log for acats has:
=== acats support ===
Generating support files...fatal error, run-time library not installed
correctly
cannot locate file system.ads
gnatmake: *** make failed.
 Failed to compile macrosub

Note that gcc version 4.0.1 (Apple Inc. build 5465) is /usr/bin/gcc
(which does not support Ada).  These tests are supposed to be using the just
built stage 3 compiler.

Thus the Ada acats testing has been totally omitted.

The Installing GCC information indicates the need for Prerequisites:
In order to build the Ada compiler (GNAT) you must already have GNAT installed
because portions of the Ada frontend are written in Ada.  However, there is
nothing to say that an existing Ada compiler is also needed for testing.

Consequently, although /usr/local/ada-4.3/bin/ was made available in
the PATH used at build time, it was not added for testing.  It was assumed that
testing the as yet uninstalled compilation system would be self-contained.


4 Information about the build state

4.1The build has passed stage 3, but failed later.

Completed stage3, got to
Comparing stages 2 and 3, gave:
Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Comparison successful.

It continued after this, but gave final error:
ld: warning in ../../../src/gcc-4.7.2/libitm/clearcap.map, file is not of
required architecture
ld: pointer in read-only segment not allowed in slidable image, used in
_del_opvnt from .libs/alloc_cpp.o
collect2: error: ld returned 1 exit status
make[4]: *** [libitm.la] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-target-libitm] Error 2
make: *** [all] Error 2

The current situation seems to be that I have built the entire stage 3,
but that the step Build runtime libraries using the stage3 compiler from the
previous step. has failed.

This has been discussed on 

[Bug objc++/57607] New: g++ cannot distinguish obj-c message call from c++11 lambda

2013-06-13 Thread antonbachin at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57607

Bug ID: 57607
   Summary: g++ cannot distinguish obj-c message call from c++11
lambda
   Product: gcc
   Version: 4.8.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: objc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: antonbachin at yahoo dot com

The following program (test.mm) has both a lambda and a message call:

#import cstdlib
#import iostream

#import Foundation/NSString.h

int main()
{
[] () { std::cout  Hello world!  std::endl; }();

std::cout  [@Hello world! UTF8String]  std::endl;

return EXIT_SUCCESS;
}

Compiling with gcc 4.8.1 results in:

 g++-mp-4.8 -std=c++11 test.mm  ./a.out
test.mm: In function 'int main()':
test.mm:8:6: error: expected identifier before ']' token
 [] () { std::cout  Hello world!  std::endl; }();
  ^
test.mm:8:6: error: 'expression error' is not an Objective-C class name
or
alias
test.mm:8:6: error: objective-c++ message argument(s) are expected before
']' token
test.mm:8:11: error: expected ';' before '{' token
 [] () { std::cout  Hello world!  std::endl; }();
   ^
test.mm:8:57: error: expected primary-expression before ')' token
 [] () { std::cout  Hello world!  std::endl; }();
 ^

(I know that this wouldn't link, but I'm not getting that far). Meanwhile, with
clang:

 clang++ -std=c++11 -framework Foundation test.mm  ./a.out
Hello world!
Hello world!

Version information:

 g++-mp-4.8 --version
g++-mp-4.8 (MacPorts gcc48 4.8.1_0) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 clang++ --version
Apple clang version 4.0 (tags/Apple/clang-421.0.60) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.4.0
Thread model: posix

Compiling with -Wall -Wextra makes no difference in the output for either
compiler.


[Bug c/56977] gcc -Og incorrectly warns about 'constant zero length parameter'

2013-06-13 Thread harald at gigawatt dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56977

Harald van Dijk harald at gigawatt dot nl changed:

   What|Removed |Added

 CC||harald at gigawatt dot nl

--- Comment #1 from Harald van Dijk harald at gigawatt dot nl ---
This is a bigger problem with glibc's open() implementation, where correct use
does not just lead to a warning, but to a compile-time error. Self-contained
test:

__attribute__((__error__(error))) void error ();

void f (int);

extern inline __attribute__((__always_inline__)) void f (int i) {
  if (__builtin_constant_p (i)) {
error ();
  }
}

void g(int j) {
  f (j);
}

Compiling with -Og leads to:

$ gcc -Og -c test.c
In function ‘f’,
inlined from ‘g’ at test.c:12:5:
test.c:7:11: error: call to ‘error’ declared with attribute error: error
 error ();
   ^
$ gcc --version
gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The if block, including the call to error(), gets removed at all optimization
levels (even -O0) other than -Og.

[Bug c++/57509] Segmentation fault when using __builtin_shuffle in templated class.

2013-06-13 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57509

Marc Glisse glisse at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |glisse at gcc dot 
gnu.org
   Target Milestone|--- |4.9.0

--- Comment #8 from Marc Glisse glisse at gcc dot gnu.org ---
Patch posted:
http://gcc.gnu.org/ml/gcc-patches/2013-06/msg00470.html


[Bug tree-optimization/57361] Remove self memory assignment

2013-06-13 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57361

--- Comment #2 from Marc Glisse glisse at gcc dot gnu.org ---
I'll let Richard decide if this should stay open for the more aggressive
optimization or not.

r200034 | glisse | 2013-06-12 19:56:30 +0200 (Wed, 12 Jun 2013) | 10 lines

2013-06-12  Marc Glisse  marc.gli...@inria.fr

PR tree-optimization/57361
gcc/
* tree-ssa-dse.c (dse_possible_dead_store_p): Handle self-assignment.

gcc/testsuite/
* gcc.dg/tree-ssa/pr57361.c: New file.


[Bug tree-optimization/57328] Missed optimization: Unable to vectorize Fortran min and max intrinsics

2013-06-13 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57328

Marc Glisse glisse at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2013-06-13
 Blocks||53947
 Ever confirmed|0   |1

--- Comment #11 from Marc Glisse glisse at gcc dot gnu.org ---
Confirming that we currently can't vectorize code that involves a
(con|dis)jonction of several conditions.


[Bug preprocessor/53525] Performance regression due to enabling track-macro-expansion

2013-06-13 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53525

Manuel López-Ibáñez manu at gcc dot gnu.org changed:

   What|Removed |Added

 CC||manu at gcc dot gnu.org

--- Comment #17 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
(In reply to Mathias Gaunard from comment #16)
 I opened bug #56746 a while ago which is somewhat related to this.
 ftrack-macro-expansion is causing 50% increased memory usage in my case (C++
 code with heavy usage of macros and templates).
 
 Please also consider memory usage and not just performance.

Perhaps you could try the patches posted here and report whether they
reduce/increase memory usage? I am afraid that at the moment there is none with
enough free time to work on this, so all the help we can get is appreciated.

If you want me, i can close the other bug as a duplicate of this to have all
info in a single bug, and update the description mentioning also memory usage.

[Bug target/57608] New: wrong code for expression at -O3 on x86_64-linux-gnu with -m32

2013-06-13 Thread dhazeghi at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57608

Bug ID: 57608
   Summary: wrong code for expression at -O3 on x86_64-linux-gnu
with -m32
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dhazeghi at yahoo dot com

Current gcc trunk and 4.8.x produces wrong code for the following testcase on
x86_64-linux when compiled at -O3 in 32-bit mode.  This is a regression from
4.7.x.

$ gcc-trunk -v
gcc version 4.9.0 20130613 (experimental) [trunk revision 200065] (GCC) 
$ gcc-trunk -O2 -m32 wrong.c 
$ ./a.out 
2
$ gcc-4.7 -O3 -m32 wrong.c 
$ ./a.out 
2
$ gcc-trunk -O3 -m32 wrong.c 
$ ./a.out 
3
$
--
int printf(const char *, ...);

int a, b, d, e, *f = b;
long long l, *pl = l;
char c, *pc = c;

int bar(int r, long long s) {
  b++;
  a = 0;
  if (b) {
b = r + s;
b++;
return c;
  }
  {
int arr[] = {};
return 0;
  }
}

void foo(int j) {
  int k;
  for (; j != 5; ++j) {
*pc = *f;
for (; e != 1; e++) {
  *pl = 0;
  {
int i = 0;
for (; i  1; i++)
  a = 0;
  }
  k = bar(d, 1);
  d = bar(1, k);
}
  }
}

void baz() { foo(0); }

int main() {
  foo(0);
  printf(%d\n, c);
  return 0;
}


[Bug middle-end/23623] volatile keyword changes bitfield access size from 32bit to 8bit

2013-06-13 Thread sandra at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23623

--- Comment #16 from Sandra Loosemore sandra at codesourcery dot com ---
Patch that fixes regression posted here:

http://gcc.gnu.org/ml/gcc-patches/2013-06/msg00750.html


[Bug middle-end/48784] #pragma pack(1) + -fstrict-volatile-bitfields = bad codegen

2013-06-13 Thread sandra at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48784

--- Comment #3 from Sandra Loosemore sandra at codesourcery dot com ---
Patch posted here:

http://gcc.gnu.org/ml/gcc-patches/2013-06/msg00750.html


[Bug middle-end/56341] GCC produces unaligned data access

2013-06-13 Thread sandra at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56341

--- Comment #12 from Sandra Loosemore sandra at codesourcery dot com ---
Patch for the first problem posted here:

http://gcc.gnu.org/ml/gcc-patches/2013-06/msg00750.html


[Bug target/56997] Incorrect write to packed field when strict-volatile-bitfields enabled on aarch32

2013-06-13 Thread sandra at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56997

--- Comment #5 from Sandra Loosemore sandra at codesourcery dot com ---
Patch posted here:

http://gcc.gnu.org/ml/gcc-patches/2013-06/msg00750.html