[Bug debug/63300] 'const volatile' sometimes stripped in debug info

2014-09-22 Thread mark at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63300

Mark Wielaard  changed:

   What|Removed |Added

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

--- Comment #3 from Mark Wielaard  ---
Proposed fix: https://gcc.gnu.org/ml/gcc-patches/2014-09/msg01723.html


[Bug fortran/44882] Bogus types in references with mismatched commons

2014-09-22 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44882

--- Comment #15 from rguenther at suse dot de  ---
On Fri, 19 Sep 2014, dominiq at lps dot ens.fr wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44882
> 
> Dominique d'Humieres  changed:
> 
>What|Removed |Added
> 
>  Status|NEW |WAITING
> 
> --- Comment #14 from Dominique d'Humieres  ---
> I dont see any ICE for the test in comment 12 on powerpc-apple-darwin9 (from
> 4.4.7 to r214282). Any reason why this PR is still open?

See comment #5/6, the Fortran frontend still produces wrong-code or
silently accepts invalid input.


[Bug c/63303] Pointer subtraction is broken when using -fsanitize=undefined

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63303

--- Comment #10 from Richard Biener  ---
To support the standards definition of p1 - p2 we'd need a POINTER_DIFF_EXPR
that also embeds the exact division by the array element size.

Btw, while C and C++ share pointer_int_sum they have differing implementations
for computing pointer differences.

The safe variant would be indeed to compute the pointer difference using an
unsigned type and I can't see what optimizations we lose when doing that.
Note that you'd still need to convert the result to a signed type before
doing the exact division by the element size.


[Bug fortran/63327] New: Poor caret location in error mesage

2014-09-22 Thread Joost.VandeVondele at mat dot ethz.ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63327

Bug ID: 63327
   Summary: Poor caret location in error mesage
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: Joost.VandeVondele at mat dot ethz.ch

Example code showing somewhat confusing lines and caret info

> cat test.f90
  SUBROUTINE S1(d)
INTEGER :: i,d(*)
!$OMP PARALLEL DO &
!$OMP   DEFAULT(NONE) SHARED(d) PRIVATE(i)
DO i=1,100
   c= c + &
  d(i)
   d(i)=c*c
ENDDO
  END SUBROUTINE S1

> gfortran -fopenmp test.f90
test.f90: In function ‘s1’:
test.f90:7:0: error: ‘c’ not specified in enclosing parallel
   d(i)
 ^
test.f90:4:0: error: enclosing parallel
 !$OMP   DEFAULT(NONE) SHARED(d) PRIVATE(i)
 ^

[Bug sanitizer/63316] [5.0 Regression] False asan positive

2014-09-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63316

--- Comment #3 from Jakub Jelinek  ---
MALLOC_ABI_ALIGNMENT is BITS_PER_WORD (too small for Linux actually, glibc
guarantees 2 * BITS_PER_WORD).
So, this IMNSHO is a libsanitizer bug, in that it doesn't provide the Linux ABI
guaranteed alignments.  On 32-bit Linux targets, malloc even for 1-7 bytes (and
0 if it doesn't return NULL for that) allocations should return 8 byte aligned
memory, and for 64-bit Linux targets, malloc even for 1-15 bytes long
allocations should return 16 byte aligned memory.
Kostya, can you please fix sanitizer_common?


[Bug c++/63323] "confused by earlier errors, bailing out" with no other errors

2014-09-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63323

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-09-22
  Known to work||5.0
 Ever confirmed|0   |1
  Known to fail||4.9.0, 4.9.1

--- Comment #1 from Jonathan Wakely  ---
Confirmed. Trunk prints the full error though.


[Bug c++/63323] "confused by earlier errors, bailing out" with no other errors

2014-09-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63323

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||mpolacek at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
This is a dup of PR61272 , Marek, can you please apply your PR61272 patch to
4.9 branch too?  Thanks.


[Bug c++/63323] "confused by earlier errors, bailing out" with no other errors

2014-09-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63323

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org
   Target Milestone|--- |4.9.2

--- Comment #3 from Marek Polacek  ---
On it.


[Bug debug/55641] debug info for the type of a reference declared with a typedef has spurious 'const'

2014-09-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55641

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #10 from Marek Polacek  ---
Mark recently tweaked this code, but I still see the DW_TAG_const_type in
there.


[Bug debug/60782] DWARF does not represent _Atomic

2014-09-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60782

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-09-22
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Marek Polacek  ---
Confirmed.


[Bug ipa/63270] [5 Regression] internal compiler error: in odr_types_equivalent_p, at ipa-devirt.c:1075

2014-09-22 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63270

--- Comment #5 from marxin at gcc dot gnu.org ---
Author: marxin
Date: Mon Sep 22 09:39:20 2014
New Revision: 215451

URL: https://gcc.gnu.org/viewcvs?rev=215451&root=gcc&view=rev
Log:
PR lto/63270 - new test

* g++.dg/lto/pr63270_0.C: New test.
* g++.dg/lto/pr63270_1.C: New test.


Added:
trunk/gcc/testsuite/g++.dg/lto/pr63270_0.C
trunk/gcc/testsuite/g++.dg/lto/pr63270_1.C
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug fortran/63327] Poor caret location in error mesage

2014-09-22 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63327

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-09-22
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed from 4.8.3 up to trunk (5.0). The errors are displayed without caret
with gfortran 4.7.4.


[Bug ipa/63298] [5 Regression] internal compiler error: in types_same_for_odr, at ipa-devirt.c:449 with LTO

2014-09-22 Thread mliska at suse dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63298

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #5 from Martin Liška  ---
Fixed.

[Bug debug/63328] New: c-c++-common/gomp/pr60823-3.c test fails with -fcompare-debug

2014-09-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63328

Bug ID: 63328
   Summary: c-c++-common/gomp/pr60823-3.c test fails with
-fcompare-debug
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
  Assignee: jakub at gcc dot gnu.org
  Reporter: jakub at gcc dot gnu.org

xgcc: error: /usr/src/gcc/gcc/testsuite/c-c++-common/gomp/pr60823-3.c:
-fcompare-debug failure


[Bug ipa/63298] [5 Regression] internal compiler error: in types_same_for_odr, at ipa-devirt.c:449 with LTO

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63298

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |5.0


[Bug c++/63295] Insane memory use

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63295

Richard Biener  changed:

   What|Removed |Added

   Keywords||compile-time-hog

--- Comment #1 from Richard Biener  ---
Confirmed on trunk.  It also takes much time to compile.


[Bug lto/63286] [5 Regression] FAIL: g++.dg/lto/20101014-2 cp_lto_20101014-2_0.o assemble, * after r215196

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63286

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |5.0


[Bug tree-optimization/63288] [5 Regression] gcc.c-torture/execute/20140326-1.c FAILs with -Og -fgcse -fif-conversion2

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63288

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |5.0


[Bug debug/63285] [4.9 Regression] -fcompare-debug scheduler related failure

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63285

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-09-22
  Known to work||5.0
Summary|[4.9/5 Regression]  |[4.9 Regression]
   |-fcompare-debug scheduler   |-fcompare-debug scheduler
   |related failure |related failure
 Ever confirmed|0   |1
  Known to fail||4.9.1

--- Comment #4 from Richard Biener  ---
Fixed on trunk sofar.


[Bug pch/63319] [5 Regression] ICE: Segmentation fault building qt5 with pch

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63319

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |5.0


[Bug sanitizer/63316] [5.0 Regression] False asan positive

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63316

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |5.0


[Bug ipa/63313] [5 Regression] ICE in ipa-comdats.c:371

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63313

Richard Biener  changed:

   What|Removed |Added

Version|unknown |5.0
   Target Milestone|--- |5.0
Summary|ICE in ipa-comdats.c:371|[5 Regression] ICE in
   ||ipa-comdats.c:371


[Bug middle-end/63311] [4.9/5 Regression] -O1 optimization introduces valgrind warning

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63311

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |4.9.2


[Bug middle-end/63311] [4.9/5 Regression] -O1 optimization introduces valgrind warning

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63311

--- Comment #1 from Richard Biener  ---
This is probably ifcombine at work and the target splitting the combined
condition back, but the other way around.


[Bug c/63307] [4.9/5 Regression] Cilk+ breaks -fcompare-debug bootstrap

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63307

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |4.9.2


[Bug debug/63284] [4.9/5 Regression] -fcompare-debug issue due to redirection to __builtin_unreachable ()

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63284

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #5 from Richard Biener  ---
Fixed.


[Bug bootstrap/63280] [5 Regression] Double free in GCC compiled with LTO and -O3.

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63280

Richard Biener  changed:

   What|Removed |Added

 CC||rsandifo at gcc dot gnu.org
   Target Milestone|--- |5.0
Summary|Double free in GCC compiled |[5 Regression] Double free
   |with LTO and -O3.   |in GCC compiled with LTO
   ||and -O3.


[Bug debug/63328] c-c++-common/gomp/pr60823-3.c test fails with -fcompare-debug

2014-09-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63328

--- Comment #1 from Jakub Jelinek  ---
Author: jakub
Date: Mon Sep 22 10:32:09 2014
New Revision: 215454

URL: https://gcc.gnu.org/viewcvs?rev=215454&root=gcc&view=rev
Log:
PR debug/63328
* omp-low.c (ipa_simd_modify_stmt_ops): For debug stmts
insert a debug source bind stmt setting DEBUG_EXPR_DECL
instead of a normal gimple assignment stmt.

* c-c++-common/gomp/pr63328.c: New test.

Added:
trunk/gcc/testsuite/c-c++-common/gomp/pr63328.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/omp-low.c
trunk/gcc/testsuite/ChangeLog


[Bug middle-end/63311] [4.9/5 Regression] -O1 optimization introduces valgrind warning

2014-09-22 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63311

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-09-22
 Ever confirmed|0   |1

--- Comment #2 from Dominique d'Humieres  ---
Confirmed.


[Bug debug/63328] c-c++-common/gomp/pr60823-3.c test fails with -fcompare-debug

2014-09-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63328

--- Comment #2 from Jakub Jelinek  ---
Author: jakub
Date: Mon Sep 22 10:34:16 2014
New Revision: 215455

URL: https://gcc.gnu.org/viewcvs?rev=215455&root=gcc&view=rev
Log:
PR debug/63328
* omp-low.c (ipa_simd_modify_stmt_ops): For debug stmts
insert a debug source bind stmt setting DEBUG_EXPR_DECL
instead of a normal gimple assignment stmt.

* c-c++-common/gomp/pr63328.c: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/c-c++-common/gomp/pr63328.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/omp-low.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


[Bug debug/63328] c-c++-common/gomp/pr60823-3.c test fails with -fcompare-debug

2014-09-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63328

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #3 from Jakub Jelinek  ---
Fixed.


[Bug target/63312] FAIL: gcc.dg/torture/float128-exact-underflow.c -O0 execution test

2014-09-22 Thread jsm28 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63312

--- Comment #3 from Joseph S. Myers  ---
Author: jsm28
Date: Mon Sep 22 11:08:03 2014
New Revision: 215458

URL: https://gcc.gnu.org/viewcvs?rev=215458&root=gcc&view=rev
Log:
PR target/63312
* config/ia64/sfp-machine.h (FE_EX_ALL, FP_TRAPPING_EXCEPTIONS):
New macros.

Modified:
trunk/libgcc/ChangeLog
trunk/libgcc/config/ia64/sfp-machine.h


[Bug target/63312] FAIL: gcc.dg/torture/float128-exact-underflow.c -O0 execution test

2014-09-22 Thread jsm28 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63312

Joseph S. Myers  changed:

   What|Removed |Added

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

--- Comment #4 from Joseph S. Myers  ---
Fixed for GCC 5.


[Bug target/63312] FAIL: gcc.dg/torture/float128-exact-underflow.c -O0 execution test

2014-09-22 Thread jsm28 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63312

Joseph S. Myers  changed:

   What|Removed |Added

   Target Milestone|--- |5.0


[Bug c++/63323] "confused by earlier errors, bailing out" with no other errors

2014-09-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63323

--- Comment #4 from Marek Polacek  ---
Author: mpolacek
Date: Mon Sep 22 11:27:54 2014
New Revision: 215459

URL: https://gcc.gnu.org/viewcvs?rev=215459&root=gcc&view=rev
Log:
PR c++/63323
* ubsan.c (is_ubsan_builtin_p): Turn assert into a condition.

* g++.dg/ubsan/pr61272.C: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/g++.dg/ubsan/pr61272.C
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
branches/gcc-4_9-branch/gcc/ubsan.c


[Bug c++/63323] "confused by earlier errors, bailing out" with no other errors

2014-09-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63323

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #5 from Marek Polacek  ---
Should be fixed.


[Bug libstdc++/63329] New: std::bind does not define argument_type

2014-09-22 Thread thomas.sanchz at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63329

Bug ID: 63329
   Summary: std::bind does not define argument_type
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thomas.sanchz at gmail dot com

Hi,

It looks like the data structure returned by bind does not contain some type
(argument_type) required by std::not1 for instance.
It works with clang + the libc++ on Mac Os X.

#include 
#include 

struct Test { bool pred() const { return true; } };
int main(int argc, char *argv[])
{
  // works
  auto f1 = std::not1(std::mem_fn(&Test::pred));
  // works
  auto f2 = std::not1(std::mem_fun(&Test::pred));
  // does not work: error: no type named ‘argument_type’ 
  auto f3 = std::not1(std::bind(&Test::pred, std::placeholders::_1));
}


Thanks a lot.

[Bug target/63330] New: vector shuffle resembling vector shift not expanded optimally

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63330

Bug ID: 63330
   Summary: vector shuffle resembling vector shift not expanded
optimally
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rguenth at gcc dot gnu.org
Target: x86_64-*-*, i?86-*-*

typedef int v4si __attribute__((vector_size(16)));
v4si foo (v4si x)
{
  return __builtin_shuffle (x, (v4si){ 0, 0, 0, 0 },
 (v4si){4, 3, 2, 1 });
}

and similar shuffles "shifting" a vector by whole-element amounts
left/right and inserting zeros are not expanded optimally (while
the target has at least a vec_shr optab which suggests sth would
be available).

With -mavx2 I get for the above

vpxor   %xmm1, %xmm1, %xmm1
vpalignr$4, %xmm0, %xmm1, %xmm0
vpshufd $27, %xmm0, %xmm0

while I expected sth like

psrldq %xmm0, $4

__builtin_shuffle (x, (v4si) { -1, -1, -1, -1 }, ... )

Arbitrary constants "shifted in" could be handled the same by IORing
the shifted in value after the psrldq in the appropriate elements
for the cost of an extra vector constant.


[Bug target/63330] vector shuffle resembling vector shift not expanded optimally

2014-09-22 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63330

--- Comment #1 from Richard Biener  ---
(this is aimed at removing VEC_RSHIFT_EXPR and thus no longer using vec_shr)


[Bug lto/63226] [5 Regression] ICE with -flto-odr-type-merging

2014-09-22 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63226

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 CC||trippels at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #10 from Markus Trippelsdorf  ---
marxin added a testcase in r215451.


[Bug libstdc++/63329] std::bind does not define argument_type

2014-09-22 Thread thomas.sanchz at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63329

--- Comment #1 from Thomas Sanchez  ---
BTW, I forgot to add that the compiler is invoked with this command:
   g++ -std=c++11 test.cpp

Also, funny thing, with clang, it is the first one that do not compile :)

Thanks,


[Bug c++/61857] An init-capturing lambda is parsed incorrectly when used in a braced-init-list

2014-09-22 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61857

--- Comment #1 from Paolo Carlini  ---
In our case the issue is slightly different, the problem is in
cp_parser_initializer_list, here:

  cp_parser_parse_tentatively (parser);
  cp_lexer_consume_token (parser->lexer);
  designator = cp_parser_constant_expression (parser, true, &non_const);
  cp_parser_require (parser, CPP_CLOSE_SQUARE, RT_CLOSE_SQUARE);
  cp_parser_require (parser, CPP_EQ, RT_EQ);
  if (!cp_parser_parse_definitely (parser))
designator = NULL_TREE;
  else if (non_const)
require_potential_rvalue_constant_expression (designator);

where cp_parser_constant_expression is tentatively called. I think it can be
solved by looking forward for the '=', similarly to other GNU extensions, for
example compound literals.


[Bug fortran/63331] New: Fortran -fcompare-debug issues

2014-09-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63331

Bug ID: 63331
   Summary: Fortran -fcompare-debug issues
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jakub at gcc dot gnu.org
CC: burnus at gcc dot gnu.org

In -fcompare-debug bootstrap/regtest (GCC_COMPARE_DEBUG=1 in the environment),
I'm seeing various gfortran.dg regressions compared to normal regtest:
+FAIL: gfortran.dg/coarray/alloc_comp_1.f90 -fcoarray=single  -O2  (test for
excess errors)
+UNRESOLVED: gfortran.dg/coarray/alloc_comp_1.f90 -fcoarray=single  -O2 
compilation failed to produce executable
+FAIL: gfortran.dg/coarray/alloc_comp_1.f90 -fcoarray=lib  -O2  -lcaf_single
(test for excess errors)
+UNRESOLVED: gfortran.dg/coarray/alloc_comp_1.f90 -fcoarray=lib  -O2 
-lcaf_single compilation failed to produce executable
+FAIL: gfortran.dg/coarray/alloc_comp_3.f90 -fcoarray=single  -O2  (test for
excess errors)
+FAIL: gfortran.dg/coarray/alloc_comp_3.f90 -fcoarray=lib  -O2  -lcaf_single
(test for excess errors)
+FAIL: gfortran.dg/coarray/lib_realloc_1.f90 -fcoarray=single  -O2  (test for
excess errors)
+UNRESOLVED: gfortran.dg/coarray/lib_realloc_1.f90 -fcoarray=single  -O2 
compilation failed to produce executable
+FAIL: gfortran.dg/coarray/lib_realloc_1.f90 -fcoarray=lib  -O2  -lcaf_single
(test for excess errors)
+UNRESOLVED: gfortran.dg/coarray/lib_realloc_1.f90 -fcoarray=lib  -O2 
-lcaf_single compilation failed to produce executable
+FAIL: gfortran.dg/coarray/subobject_1.f90 -fcoarray=single  -O2  (test for
excess errors)
+UNRESOLVED: gfortran.dg/coarray/subobject_1.f90 -fcoarray=single  -O2 
compilation failed to produce executable
+FAIL: gfortran.dg/coarray/subobject_1.f90 -fcoarray=lib  -O2  -lcaf_single
(test for excess errors)
+UNRESOLVED: gfortran.dg/coarray/subobject_1.f90 -fcoarray=lib  -O2 
-lcaf_single compilation failed to produce executable
+FAIL: gfortran.dg/class_optional_1.f90   -O0  (test for excess errors)
+UNRESOLVED: gfortran.dg/class_optional_1.f90   -O0  compilation failed to
produce executable
+FAIL: gfortran.dg/class_optional_1.f90   -O1  (test for excess errors)
+UNRESOLVED: gfortran.dg/class_optional_1.f90   -O1  compilation failed to
produce executable
+FAIL: gfortran.dg/class_optional_1.f90   -O2  (test for excess errors)
+UNRESOLVED: gfortran.dg/class_optional_1.f90   -O2  compilation failed to
produce executable
+FAIL: gfortran.dg/class_optional_1.f90   -O3 -fomit-frame-pointer  (test for
excess errors)
+UNRESOLVED: gfortran.dg/class_optional_1.f90   -O3 -fomit-frame-pointer 
compilation failed to produce executable
+FAIL: gfortran.dg/class_optional_1.f90   -O3 -fomit-frame-pointer
-funroll-loops  (test for excess errors)
+UNRESOLVED: gfortran.dg/class_optional_1.f90   -O3 -fomit-frame-pointer
-funroll-loops  compilation failed to produce executable
+FAIL: gfortran.dg/class_optional_1.f90   -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions  (test for excess errors)
+UNRESOLVED: gfortran.dg/class_optional_1.f90   -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions  compilation failed to produce executable
+FAIL: gfortran.dg/class_optional_1.f90   -O3 -g  (test for excess errors)
+UNRESOLVED: gfortran.dg/class_optional_1.f90   -O3 -g  compilation failed to
produce executable
+FAIL: gfortran.dg/class_optional_1.f90   -Os  (test for excess errors)
+UNRESOLVED: gfortran.dg/class_optional_1.f90   -Os  compilation failed to
produce executable
+FAIL: gfortran.dg/class_optional_2.f90   -O0  (test for excess errors)
+UNRESOLVED: gfortran.dg/class_optional_2.f90   -O0  compilation failed to
produce executable
+FAIL: gfortran.dg/class_optional_2.f90   -O1  (test for excess errors)
+UNRESOLVED: gfortran.dg/class_optional_2.f90   -O1  compilation failed to
produce executable
+FAIL: gfortran.dg/class_optional_2.f90   -O2  (test for excess errors)
+UNRESOLVED: gfortran.dg/class_optional_2.f90   -O2  compilation failed to
produce executable
+FAIL: gfortran.dg/class_optional_2.f90   -O3 -fomit-frame-pointer  (test for
excess errors)
+UNRESOLVED: gfortran.dg/class_optional_2.f90   -O3 -fomit-frame-pointer 
compilation failed to produce executable
+FAIL: gfortran.dg/class_optional_2.f90   -O3 -fomit-frame-pointer
-funroll-loops  (test for excess errors)
+UNRESOLVED: gfortran.dg/class_optional_2.f90   -O3 -fomit-frame-pointer
-funroll-loops  compilation failed to produce executable
+FAIL: gfortran.dg/class_optional_2.f90   -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions  (test for excess errors)
+UNRESOLVED: gfortran.dg/class_optional_2.f90   -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions  compilation failed to produce executable
+FAIL: gfortran.dg/class_optional_2.f90   -O3 -g  (test for excess errors)
+UNRESOLVED: gfortran.dg/class_optional_2.f90   -O3 -g  compi

[Bug fortran/63331] Fortran -fcompare-debug issues

2014-09-22 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63331

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-09-22
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed.


[Bug libstdc++/53626] [C++11] move assignment for ifstream

2014-09-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53626

--- Comment #3 from Jonathan Wakely  ---
Author: redi
Date: Mon Sep 22 13:34:09 2014
New Revision: 215463

URL: https://gcc.gnu.org/viewcvs?rev=215463&root=gcc&view=rev
Log:
Make streams movable and swappable.

PR libstdc++/54316
PR libstdc++/53626
* config/abi/pre/gnu.ver: Add new exports.
* config/io/basic_file_stdio.h (__basic_file): Support moving and
swapping.
* include/bits/basic_ios.h (basic_ios::move, basic_ios::swap):
Likewise.
* include/bits/ios_base.h (ios_base::_M_move, ios_base::_M_swap):
Likewise.
* include/bits/fstream.tcc (basic_filebuf): Likewise.
* include/bits/move.h (__exchange): Define for C++11 mode.
* include/ext/stdio_filebuf.h (stdio_filebuf): Support moving and
swapping.
* include/ext/stdio_sync_filebuf.h (stdio_sync_filebuf): Likewise.
* include/std/fstream (basic_filebuf, basic_ifstream, basic_ofstream,
basic_fstream): Likewise.
* include/std/ios: Remove whitespace.
* include/std/istream (basic_istream, basic_iostream): Support moving
and swapping.
* include/std/ostream (basic_ostream): Likewise.
* include/std/sstream (basic_stringbuf, basic_istringstream,
basic_ostringstream, basic_stringstream): Likewise.
* include/std/streambuf (basic_streambuf): Do not default copy
constructor and assignment on first declaration.
* include/std/utility (exchange): Forward to __exchange.
* testsuite/27_io/basic_filebuf/cons/char/copy_neg.cc: New.
* src/c++11/Makefile.am: Add stream-related files.
* src/c++11/Makefile.in: Regenerate.
* src/c++11/ext11-inst.cc (stdio_filebuf, stdio_sync_filebuf):
New file for explicit instantiation definitions.
* src/c++11/ios.cc: Move from src/c++98 to here.
(ios_base::_M_move, ios_base::_M_swap): Define.
* src/c++11/ios-inst.cc: Move from src/c++98 to here.
* src/c++11/iostream-inst.cc: Likewise.
* src/c++11/istream-inst.cc: Likewise.
* src/c++11/ostream-inst.cc: Likewise.
* src/c++11/sstream-inst.cc: Likewise.
* src/c++11/streambuf-inst.cc: Likewise.
* src/c++98/Makefile.am: Remove stream-related files.
* src/c++98/Makefile.in: Regenerate.
* src/c++98/ext-inst.cc (stdio_filebuf): Remove explicit
instantiations.
* src/c++98/misc-inst.cc (stdio_sync_filebuf): Likewise.
* src/c++98/ios-inst.cc: Move to src/c++11/.
* src/c++98/ios.cc: Move to src/c++11/.
* src/c++98/iostream-inst.cc: Likewise.
* src/c++98/istream-inst.cc: Likewise.
* src/c++98/ostream-inst.cc: Likewise.
* src/c++98/sstream-inst.cc: Likewise.
* src/c++98/streambuf-inst.cc: Likewise.
* testsuite/27_io/basic_filebuf/cons/char/copy_neg.cc: New.
* testsuite/27_io/basic_fstream/cons/move.cc: New.
* testsuite/27_io/basic_fstream/assign/1.cc: New.
* testsuite/27_io/basic_ifstream/cons/move.cc: New.
* testsuite/27_io/basic_ifstream/assign/1.cc: New.
* testsuite/27_io/basic_istringstream/assign/1.cc: New.
* testsuite/27_io/basic_istringstream/cons/move.cc: New.
* testsuite/27_io/basic_ofstream/cons/move.cc: New.
* testsuite/27_io/basic_ofstream/assign/1.cc: New.
* testsuite/27_io/basic_ostringstream/assign/1.cc: New.
* testsuite/27_io/basic_ostringstream/cons/move.cc: New.
* testsuite/27_io/basic_stringstream/assign/1.cc: New.
* testsuite/27_io/basic_stringstream/cons/move.cc: New.

Added:
trunk/libstdc++-v3/src/c++11/ext11-inst.cc
  - copied, changed from r215458, trunk/libstdc++-v3/src/c++98/ios-inst.cc
trunk/libstdc++-v3/src/c++11/ios-inst.cc
  - copied, changed from r215458, trunk/libstdc++-v3/src/c++98/ios-inst.cc
trunk/libstdc++-v3/src/c++11/ios.cc
  - copied, changed from r215458, trunk/libstdc++-v3/src/c++98/ios.cc
trunk/libstdc++-v3/src/c++11/iostream-inst.cc
  - copied, changed from r215458,
trunk/libstdc++-v3/src/c++98/iostream-inst.cc
trunk/libstdc++-v3/src/c++11/istream-inst.cc
  - copied, changed from r215458,
trunk/libstdc++-v3/src/c++98/istream-inst.cc
trunk/libstdc++-v3/src/c++11/ostream-inst.cc
  - copied, changed from r215458,
trunk/libstdc++-v3/src/c++98/ostream-inst.cc
trunk/libstdc++-v3/src/c++11/sstream-inst.cc
  - copied, changed from r215458,
trunk/libstdc++-v3/src/c++98/sstream-inst.cc
trunk/libstdc++-v3/src/c++11/streambuf-inst.cc
  - copied, changed from r215458,
trunk/libstdc++-v3/src/c++98/streambuf-inst.cc
trunk/libstdc++-v3/testsuite/27_io/basic_filebuf/cons/char/copy_neg.cc
trunk/libstdc++-v3/testsuite/27_io/basic_fstream/assign/
trunk/libstdc++-v3/testsuite/27_io/basic_fstream/assign/1.cc
trunk/libstdc++-v3/testsuite/27_io/basic_fstream/cons/move.cc
trunk/libstdc++-v3/testsuite/27_io/basic_ifstream/assign/
trunk/libstdc++-v3/testsuite/27_io/basic_ifstream/assign/1.cc
trunk/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/move.cc
trunk/libstdc++-v3/testsuite/27_io/basic_istringstre

[Bug libstdc++/54316] [C++11] move constructor for stringstream

2014-09-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316

--- Comment #9 from Jonathan Wakely  ---
Author: redi
Date: Mon Sep 22 13:34:09 2014
New Revision: 215463

URL: https://gcc.gnu.org/viewcvs?rev=215463&root=gcc&view=rev
Log:
Make streams movable and swappable.

PR libstdc++/54316
PR libstdc++/53626
* config/abi/pre/gnu.ver: Add new exports.
* config/io/basic_file_stdio.h (__basic_file): Support moving and
swapping.
* include/bits/basic_ios.h (basic_ios::move, basic_ios::swap):
Likewise.
* include/bits/ios_base.h (ios_base::_M_move, ios_base::_M_swap):
Likewise.
* include/bits/fstream.tcc (basic_filebuf): Likewise.
* include/bits/move.h (__exchange): Define for C++11 mode.
* include/ext/stdio_filebuf.h (stdio_filebuf): Support moving and
swapping.
* include/ext/stdio_sync_filebuf.h (stdio_sync_filebuf): Likewise.
* include/std/fstream (basic_filebuf, basic_ifstream, basic_ofstream,
basic_fstream): Likewise.
* include/std/ios: Remove whitespace.
* include/std/istream (basic_istream, basic_iostream): Support moving
and swapping.
* include/std/ostream (basic_ostream): Likewise.
* include/std/sstream (basic_stringbuf, basic_istringstream,
basic_ostringstream, basic_stringstream): Likewise.
* include/std/streambuf (basic_streambuf): Do not default copy
constructor and assignment on first declaration.
* include/std/utility (exchange): Forward to __exchange.
* testsuite/27_io/basic_filebuf/cons/char/copy_neg.cc: New.
* src/c++11/Makefile.am: Add stream-related files.
* src/c++11/Makefile.in: Regenerate.
* src/c++11/ext11-inst.cc (stdio_filebuf, stdio_sync_filebuf):
New file for explicit instantiation definitions.
* src/c++11/ios.cc: Move from src/c++98 to here.
(ios_base::_M_move, ios_base::_M_swap): Define.
* src/c++11/ios-inst.cc: Move from src/c++98 to here.
* src/c++11/iostream-inst.cc: Likewise.
* src/c++11/istream-inst.cc: Likewise.
* src/c++11/ostream-inst.cc: Likewise.
* src/c++11/sstream-inst.cc: Likewise.
* src/c++11/streambuf-inst.cc: Likewise.
* src/c++98/Makefile.am: Remove stream-related files.
* src/c++98/Makefile.in: Regenerate.
* src/c++98/ext-inst.cc (stdio_filebuf): Remove explicit
instantiations.
* src/c++98/misc-inst.cc (stdio_sync_filebuf): Likewise.
* src/c++98/ios-inst.cc: Move to src/c++11/.
* src/c++98/ios.cc: Move to src/c++11/.
* src/c++98/iostream-inst.cc: Likewise.
* src/c++98/istream-inst.cc: Likewise.
* src/c++98/ostream-inst.cc: Likewise.
* src/c++98/sstream-inst.cc: Likewise.
* src/c++98/streambuf-inst.cc: Likewise.
* testsuite/27_io/basic_filebuf/cons/char/copy_neg.cc: New.
* testsuite/27_io/basic_fstream/cons/move.cc: New.
* testsuite/27_io/basic_fstream/assign/1.cc: New.
* testsuite/27_io/basic_ifstream/cons/move.cc: New.
* testsuite/27_io/basic_ifstream/assign/1.cc: New.
* testsuite/27_io/basic_istringstream/assign/1.cc: New.
* testsuite/27_io/basic_istringstream/cons/move.cc: New.
* testsuite/27_io/basic_ofstream/cons/move.cc: New.
* testsuite/27_io/basic_ofstream/assign/1.cc: New.
* testsuite/27_io/basic_ostringstream/assign/1.cc: New.
* testsuite/27_io/basic_ostringstream/cons/move.cc: New.
* testsuite/27_io/basic_stringstream/assign/1.cc: New.
* testsuite/27_io/basic_stringstream/cons/move.cc: New.

Added:
trunk/libstdc++-v3/src/c++11/ext11-inst.cc
  - copied, changed from r215458, trunk/libstdc++-v3/src/c++98/ios-inst.cc
trunk/libstdc++-v3/src/c++11/ios-inst.cc
  - copied, changed from r215458, trunk/libstdc++-v3/src/c++98/ios-inst.cc
trunk/libstdc++-v3/src/c++11/ios.cc
  - copied, changed from r215458, trunk/libstdc++-v3/src/c++98/ios.cc
trunk/libstdc++-v3/src/c++11/iostream-inst.cc
  - copied, changed from r215458,
trunk/libstdc++-v3/src/c++98/iostream-inst.cc
trunk/libstdc++-v3/src/c++11/istream-inst.cc
  - copied, changed from r215458,
trunk/libstdc++-v3/src/c++98/istream-inst.cc
trunk/libstdc++-v3/src/c++11/ostream-inst.cc
  - copied, changed from r215458,
trunk/libstdc++-v3/src/c++98/ostream-inst.cc
trunk/libstdc++-v3/src/c++11/sstream-inst.cc
  - copied, changed from r215458,
trunk/libstdc++-v3/src/c++98/sstream-inst.cc
trunk/libstdc++-v3/src/c++11/streambuf-inst.cc
  - copied, changed from r215458,
trunk/libstdc++-v3/src/c++98/streambuf-inst.cc
trunk/libstdc++-v3/testsuite/27_io/basic_filebuf/cons/char/copy_neg.cc
trunk/libstdc++-v3/testsuite/27_io/basic_fstream/assign/
trunk/libstdc++-v3/testsuite/27_io/basic_fstream/assign/1.cc
trunk/libstdc++-v3/testsuite/27_io/basic_fstream/cons/move.cc
trunk/libstdc++-v3/testsuite/27_io/basic_ifstream/assign/
trunk/libstdc++-v3/testsuite/27_io/basic_ifstream/assign/1.cc
trunk/libstdc++-v3/testsuite/27_io/basic_ifstream/cons/move.cc
trunk/libstdc++-v3/testsuite/27_io/basic_istringstre

[Bug testsuite/63332] New: problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test

2014-09-22 Thread richard at netbsd dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63332

Bug ID: 63332
   Summary: problem with VERIFY in
ext/random/k_distribution/operators/serialize.cc
execution test
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: richard at netbsd dot org

Created attachment 33531
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33531&action=edit
testsuite module updated with couts showing issue is with VERIFY

Working with gcc49 on SunOS 5.11 i386 (Omnios) and pkgsrc (32-bit trunk)
I came across the following failure:

FAIL: ext/random/k_distribution/operators/serialize.cc execution test

scratching my head a bit, I added some outputs and found that the problem is
with VERIFY and not with the functions being tested.

here is my output with the attached (modified) serialize.cc:
$ ./a.out
u: 2.0e+00 1.5e+00 3.0e+00
2.0e+00 5.0e-01 0.0e+00
1.0e+00 1 -1.08681804426135680e+00 3.0e+00
5.0e-01 0.0e+00 1.0e+00 1
1.89131873404367808e-01
v: 2.0e+00 1.5e+00 3.0e+00
2.0e+00 5.0e-01 0.0e+00
1.0e+00 1 -1.08681804426135680e+00 3.0e+00
5.0e-01 0.0e+00 1.0e+00 1
1.89131873404367808e-01
Assertion failed: u == v, file serialize.cc, line 48, function test01
Abort (core dumped)


[Bug testsuite/63332] problem with VERIFY in ext/random/k_distribution/operators/serialize.cc execution test

2014-09-22 Thread richard at netbsd dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63332

--- Comment #1 from Richard PALO  ---
BTW, I'm curious if the problem is related to float rounding in I/O, as in
FAIL: ext/random/hypergeometric_distribution/operators/values.cc execution test


[Bug libstdc++/54316] [C++11] move constructor for stringstream

2014-09-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316
Bug 54316 depends on bug 53626, which changed state.

Bug 53626 Summary: [C++11] move assignment for ifstream
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53626

   What|Removed |Added

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


[Bug libstdc++/53626] [C++11] move assignment for ifstream

2014-09-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53626

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #4 from Jonathan Wakely  ---
Fixed for GCC 5


[Bug libstdc++/54316] [C++11] move constructor for stringstream

2014-09-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54316

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #10 from Jonathan Wakely  ---
Fixed for GCC 5


[Bug libstdc++/63329] std::bind does not define argument_type

2014-09-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63329

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #2 from Jonathan Wakely  ---
The standard does not require the typedef to be defined (libc++ apparently does
it as an extension)

See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4076.html for a
generic replacement for std::not1 that is proposed for a future standard.


[Bug libstdc++/63329] std::bind does not define argument_type

2014-09-22 Thread thomas.sanchz at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63329

--- Comment #3 from Thomas Sanchez  ---
While it is not really intuitive I understand.

Thanks for your time!


[Bug c/63303] Pointer subtraction is broken when using -fsanitize=undefined

2014-09-22 Thread mikulas at artax dot karlin.mff.cuni.cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63303

--- Comment #11 from mikulas at artax dot karlin.mff.cuni.cz ---
Richard Biener: if the middle end tells us that one pointer is greater or equal
than the other pointer, we could do unsigned subtraction and shift.

But if we don't know which pointer is greater, it gets more complicated: To do
correct short* pointer subtraction, we need to subtract pointers using
sub %edx, %eax; rcr $1, %eax --- i.e. shift the carry bit back to the topmost
bit of the result. According to Agner's tables, rcr with 1-bit count takes 1
tick on AMD and 2 ticks on Intel, so the performance penalty isn't that big. On
other architectures that lack rcr, it would be more complicated.

Another possibility is to file a defect report on the C standard and request
that program in comment 4 be considered invalid. - for example, change the
wording to this: "If the result multiplied by the size of the array element is
not representable in an object of that type, the behavior is undefined." - that
would specify that that subtraction is invalid.


[Bug target/63330] vector shuffle resembling vector shift not expanded optimally

2014-09-22 Thread dje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63330

David Edelsohn  changed:

   What|Removed |Added

 Target|x86_64-*-*, i?86-*-*|x86_64-*-*, i?86-*-*,
   ||powerpc*-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-09-22
 CC||dje at gcc dot gnu.org,
   ||wschmidt at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from David Edelsohn  ---
Confirmed on PPC also.


[Bug middle-end/63197] tc-m68k.c: Wrong warning "array subscript is below array bounds"

2014-09-22 Thread jbg...@lug-owl.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63197

--- Comment #2 from Jan-Benedict Glaw  ---
With today's binutils snapshot, there's a gas_assert in front of it, which
silences this bogus warning. That needs to be reverted to test GCC wrt. this
issue.


[Bug fortran/63331] Fortran -fcompare-debug issues

2014-09-22 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63331

--- Comment #2 from Jakub Jelinek  ---
Created attachment 33532
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33532&action=edit
gcc5-pr63331.patch

Untested patch to fix (or work around) all but the last 2 FAILs.
It seems there is no real need to have DECL_UID differences in this case, we
can just use DEBUG_EXPR_DECLs instead of VAR_DECLs for the debughook.
That said, the use of DECL_UID in lhd_set_decl_assembler_name is IMHO still
problematic, but if DECL_UID appear only after the FE is done with the stuff,
it should be less important issue.


[Bug middle-end/63197] tc-m68k.c: Wrong warning "array subscript is below array bounds"

2014-09-22 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63197

Alan Modra  changed:

   What|Removed |Added

 CC||amodra at gmail dot com

--- Comment #3 from Alan Modra  ---
Created attachment 33533
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33533&action=edit
reduced testcase


[Bug middle-end/63197] tc-m68k.c: Wrong warning "array subscript is below array bounds"

2014-09-22 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63197

Alan Modra  changed:

   What|Removed |Added

 Target||x86_64-linux
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-09-22
   Host||x86_64-linux
 Ever confirmed|0   |1
  Build||x86_64-linux


[Bug lto/63333] New: lto, 1to1 segmentation fault

2014-09-22 Thread a...@cloudius-systems.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=6

Bug ID: 6
   Summary: lto, 1to1 segmentation fault
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: a...@cloudius-systems.com

A random change (adding a new virtual function) in a program produced this.  I
realize this is not sufficient to reproduce, but maybe this can jog someone's
memory.  If not, I can try to minimize.

(gdb) bt
#0  0x7f2f900bd887 in __GI_raise (sig=sig@entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x7f2f900bef78 in __GI_abort () at abort.c:89
#2  0x009eed13 in real_abort () at ../../gcc/diagnostic.c:1200
#3  diagnostic_action_after_output (context=context@entry=0x167a700
, diagnostic=0x7fffb8503f60) at
../../gcc/diagnostic.c:447
#4  0x00eede6e in diagnostic_report_diagnostic(diagnostic_context*,
diagnostic_info*) () at ../../gcc/diagnostic.c:804
#5  0x009eef5f in internal_error (gmsgid=gmsgid@entry=0xf8aafe "%s") at
../../gcc/diagnostic.c:1136
#6  0x00697bdc in crash_signal (signo=11) at ../../gcc/toplev.c:339
#7  
#8  htab_hash_string (p=0x0) at ../../libiberty/hashtab.c:839
#9  0x00569f9d in hash (r=) at
../../gcc/dwarf2out.c:7501
#10 find_slot (insert=INSERT, value=0x7fffb8504650, this=0x7fffb8504648) at
../../gcc/hash-table.h:505
#11 lookup_external_ref (map=..., die=die@entry=0x7f2f897f70f0) at
../../gcc/dwarf2out.c:7529
#12 0x00569c44 in optimize_external_refs_1 (die=0x7f2f894957d0,
map=map@entry=...) at ../../gcc/dwarf2out.c:7567
#13 0x00aa0eff in optimize_external_refs_1(die_struct*,
hash_table) () at ../../gcc/dwarf2out.c:7571
#14 0x00aa0eff in optimize_external_refs_1(die_struct*,
hash_table) () at ../../gcc/dwarf2out.c:7571
#15 0x00e634a2 in optimize_external_refs(die_struct*) () at
../../gcc/dwarf2out.c:7621
#16 0x00e63205 in output_comp_unit(die_struct*, int) () at
../../gcc/dwarf2out.c:8807
#17 0x00561d12 in dwarf2out_finish (filename=) at
../../gcc/dwarf2out.c:24252
#18 0x00e9664e in compile_file() () at ../../gcc/toplev.c:601
#19 0x00e960e6 in do_compile () at ../../gcc/toplev.c:1917
#20 toplev_main(int, char**) () at ../../gcc/toplev.c:1995
#21 0x7f2f900a9d65 in __libc_start_main (main=0xa1a5e0 ,
argc=25, argv=0x7fffb8504b88, init=, 
fini=, rtld_fini=, stack_end=0x7fffb8504b78)
at libc-start.c:285
#22 0x00e1365c in _start ()

In frame 9, die->die_id is zeroed.


[Bug target/63334] New: -m16 should turn off MMX, SSE, AVX as well as VEX-encoded scalar instructions

2014-09-22 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63334

Bug ID: 63334
   Summary: -m16 should turn off MMX, SSE, AVX as well as
VEX-encoded scalar instructions
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
CC: kirill.yukhin at intel dot com
Target: x86

MMX, SSE, AVX as well as VEX-encoded scalar instructions are supported
in 16-bit mode.  -m16 should turn them off:

[hjl@gnu-6 gcc]$ touch x.i
[hjl@gnu-6 gcc]$ ./xgcc -B./ -m16 x.i -march=native -v -S
Reading specs from ./specs
COLLECT_GCC=./xgcc
Target: x86_64-unknown-linux-gnu
Configured with: /export/gnu/import/git/gcc/configure
--enable-languages=c,c++,fortran --disable-bootstrap --prefix=/usr/gcc-5.0.0
--with-local-prefix=/usr/local --enable-gnu-indirect-function --with-fpmath=sse
Thread model: posix
gcc version 5.0.0 20140911 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-B' './' '-m16' '-march=native' '-v' '-S'
 ./cc1 -fpreprocessed x.i -march=haswell -mmmx -mno-3dnow -msse -msse2 -msse3
-mssse3 -mno-sse4a -mcx16 -msahf -mmovbe -maes -mno-sha -mpclmul -mpopcnt -mabm
-mno-lwp -mfma -mno-fma4 -mno-xop -mbmi -mbmi2 -mno-tbm -mavx -mavx2 -msse4.2
-msse4.1 -mlzcnt -mno-rtm -mno-hle -mrdrnd -mf16c -mfsgsbase -mno-rdseed
-mno-prfchw -mno-adx -mfxsr -mxsave -mxsaveopt -mno-avx512f -mno-avx512er
-mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec
-mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl --param l1-cache-size=32
--param l1-cache-line-size=64 --param l2-cache-size=8192 -mtune=haswell -quiet
-dumpbase x.i -m16 -auxbase x -version -o x.s
GNU C (GCC) version 5.0.0 20140911 (experimental) (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.8.3 20140624 (Red Hat 4.8.3-1), GMP version
5.1.2, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 5.0.0 20140911 (experimental) (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.8.3 20140624 (Red Hat 4.8.3-1), GMP version
5.1.2, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 86d44baffb9b5e3d04fa82fe0af72a3d
COMPILER_PATH=./
LIBRARY_PATH=./:/lib/../lib64/:/usr/lib/../lib64/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-B' './' '-m16' '-march=native' '-v' '-S'
[hjl@gnu-6 gcc]$


[Bug libgcc/63335] New: GCC:failures for vector double on calls to bif vec_[all|any]_[nge|nle]

2014-09-22 Thread lei at ca dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63335

Bug ID: 63335
   Summary: GCC:failures for vector double on calls to bif
vec_[all|any]_[nge|nle]
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgcc
  Assignee: unassigned at gcc dot gnu.org
  Reporter: lei at ca dot ibm.com

Calls to the following vector bifs fails with gcc with type vector double. 
Passes for vector float.

The same failures are on both BE and LE machines.

vec_all_nge
vec_any_nge
vec_all_nle
vec_any_nle

-

RELEASE LEVEL INFO: 

Fails on both gcc 4.8.2 and 4.9.2

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/powerpc64le-linux-gnu/4.8/lto-wrapper
Target: powerpc64le-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1'
--with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap
--disable-libsanitizer --disable-libquadmath --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-ppc64el/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-ppc64el
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-ppc64el
--with-arch-directory=ppc64el --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-secureplt --with-cpu=power7 --with-tune=power8
--disable-multilib --enable-multiarch --disable-werror --with-long-double-128
--enable-checking=release --build=powerpc64le-linux-gnu
--host=powerpc64le-linux-gnu --target=powerpc64le-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)

$ /opt/at8.0/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/opt/at8.0/bin/gcc
COLLECT_LTO_WRAPPER=/opt/at8.0/libexec/gcc/powerpc64le-linux-gnu/4.9.2/lto-wrapper
Target: powerpc64le-linux-gnu
Configured with:
/home/tuliom/at8.0-0/at8.0-0.ubuntu-14_ppc64le_ppc64le/sources/gcc/configure
--build=powerpc64le-linux-gnu --host=powerpc64le-linux-gnu
--target=powerpc64le-linux-gnu --with-cpu=default64 --prefix=/opt/at8.0
--with-long-double-128 --enable-secureplt --disable-multilib
--enable-threads=posix --enable-languages=c,c++,fortran,go
--enable-__cxa_atexit --enable-shared --enable-checking=release --enable-lto
--enable-gnu-indirect-function --enable-initfini-array
--with-gmp-include=/opt/at8.0/include --with-gmp-lib=/opt/at8.0/lib64
--with-mpfr-include=/opt/at8.0/include --with-mpfr-lib=/opt/at8.0/lib64
--with-mpc-include=/opt/at8.0/include --with-mpc-lib=/opt/at8.0/lib64
--without-ppl --without-cloog --without-libelf
--with-host-libstdcxx='-L/opt/at8.0/lib64 -lstdc++ -lsupc++ -lgmp -lgmpxx -lm'
--with-cpu=power7 --with-tune=power8
Thread model: posix
gcc version 4.9.2 20140812 (Advance-Toolchain-at8.0) [ibm/gcc-4_9-branch,
revision: 213889 merged from gcc-4_9-branch, revision 213872] (GCC)

-

STEPS TO REPRODUCE: (Reduce the code in the README.ksh file as much as
possible)

$ gcc -m64 -fabi-version=4 -mcpu=power8 a.c
$ a.out

-

ACTUAL OUTPUT:

99.00 99.00
Actual: 1 Expected: 0
return code: 1

-

EXPECTED OUTPUT:

return code: 0

-

TESTCASE SOURCE: 

$ cat a.c
#include 
#include 

#ifdef _TEST_FLOAT
   vector float vec = (vector float ) {99.0, 99.0, 99.0, 99.0};
#else
   vector double vec = (vector double) {99.0, 99.0};
#endif

int main() {
int actual = -1;

actual = vec_all_nge(vec, vec);
if ( actual != 0) {
printf("Actual: %d Expected: 0\n", actual);
return 1;
}

return 0;
}


[Bug c/63336] New: cilkplus array notation ICE in find_rank

2014-09-22 Thread tprince at computer dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63336

Bug ID: 63336
   Summary: cilkplus array notation ICE in find_rank
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tprince at computer dot org

Created attachment 33534
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33534&action=edit
pre-processed C source with cilkplus array notation

$ gcc -std=c99  -c -fcilkplus  -v s422.i
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-unknown-cygwin
Configured with: ../configure --prefix=/usr/local/gcc5.0 --enable-languages='c
c
++ fortran' --enable-libgomp --enable-threads=posix --disable-__cxa_atexit
--wit
h-dwarf2 --without-libiconv-prefix --without-libintl-prefix --with-system-zlib
-
-disable-werror --without-cloog --without-isl
Thread model: posix
gcc version 5.0.0 20140922 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-std=c99' '-c' '-fcilkplus' '-v' '-mtune=generic'
'-march=x
86-64' '-pthread'
 /usr/local/gcc5.0/libexec/gcc/x86_64-unknown-cygwin/5.0.0/cc1.exe
-fpreprocesse
d s422.i -quiet -dumpbase s422.i -mtune=generic -march=x86-64 -auxbase s422
-std
=c99 -version -fcilkplus -o /tmp/ccCsOctk.s
GNU C (GCC) version 5.0.0 20140922 (experimental) (x86_64-unknown-cygwin)
compiled by GNU C version 5.0.0 20140922 (experimental), GMP version
6.0
.0, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 5.0.0 20140922 (experimental) (x86_64-unknown-cygwin)
compiled by GNU C version 5.0.0 20140922 (experimental), GMP version
6.0
.0, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 418ff77cc465e61e11d739c56dbe80c7
s422.c: In function ‘s422_’:
s422.c:86:5: internal compiler error: in find_rank, at
c-family/array-notation-c
ommon.c:231
 }
 ^
Please submit a full bug report,

[Bug c/63337] New: Hexadecimal exponent: improvements to error message

2014-09-22 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63337

Bug ID: 63337
   Summary: Hexadecimal exponent: improvements to error message
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dmalcolm at gcc dot gnu.org

As discussed in the thread here:
  https://gcc.gnu.org/ml/gcc/2014-09/msg00282.html
if the user mistakenly tries to use the "e" suffix for a exponent marker with a
hexadecimal constant, the warning could be improved.

$ cat /tmp/foo.c
float f = 0x3ffe+63;

$ gcc/cc1 /tmp/foo.c 
/tmp/foo.c:1:11: error: invalid suffix "+63" on integer constant
 float f = 0x3ffe+63;
   ^

A better warning might be something like:
/tmp/foo.c:1:11: error: invalid suffix "+63" on integer constant
 float f = 0x3ffe+63;
   ^
/tmp/foo.c:1:11: hint: if you meant for "e" to be an exponent, use "p" as an
exponent suffix for hexadecimal constants:
 float f = 0x3ffe+63;
^
 float f = 0x3ffp+63;
^
or somesuch; maybe even just:
/tmp/foo.c:1:11: error: use "p" rather than "e" for exponents for hexadecimal
constants
 float f = 0x3ffe+63;
^
(how far can we go down the road of actually outputting a patch?)


[Bug preprocessor/63337] Hexadecimal exponent: improvements to error message

2014-09-22 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63337

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-09-22
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
That would be nice.  Another great candidate for
https://gcc.gnu.org/ml/gcc-patches/2014-08/msg02723.html


[Bug target/63334] -m16 should turn off unsupported instructions

2014-09-22 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63334

H.J. Lu  changed:

   What|Removed |Added

Summary|-m16 should turn off MMX,   |-m16 should turn off
   |SSE, AVX as well as |unsupported instructions
   |VEX-encoded scalar  |
   |instructions|

--- Comment #1 from H.J. Lu  ---
Only VEX/EVEX instructions aren't supported in 16-bit mode.


[Bug target/63335] GCC:failures for vector double on calls to bif vec_[all|any]_[nge|nle]

2014-09-22 Thread dje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63335

David Edelsohn  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-09-22
 CC||dje at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from David Edelsohn  ---
Confirmed.


[Bug c++/61465] Bogus parameter set but not used warning in constructor initialization list

2014-09-22 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61465

--- Comment #5 from Jason Merrill  ---
Author: jason
Date: Mon Sep 22 18:47:16 2014
New Revision: 215476

URL: https://gcc.gnu.org/viewcvs?rev=215476&root=gcc&view=rev
Log:
PR c++/61465
* call.c (convert_like_real) [ck_identity]: Call mark_rvalue_use
after pulling out an element from a CONSTRUCTOR.

Added:
branches/gcc-4_9-branch/gcc/testsuite/g++.dg/warn/Wunused-parm-6.C
Modified:
branches/gcc-4_9-branch/gcc/cp/ChangeLog
branches/gcc-4_9-branch/gcc/cp/call.c


[Bug c++/62219] [c++11] Spurious error for lambda in a friend function of a class template with a default template parameters

2014-09-22 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62219

--- Comment #3 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Mon Sep 22 19:21:20 2014
New Revision: 215477

URL: https://gcc.gnu.org/viewcvs?rev=215477&root=gcc&view=rev
Log:
/cp
2014-09-22  Paolo Carlini  

PR c++/62219
* pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.

/testsuite
2014-09-22  Paolo Carlini  

PR c++/62219
* g++.dg/cpp0x/lambda/lambda-template14.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template14.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/63320] [5 Regression] bogus ‘this’ was not captured for this lambda function error

2014-09-22 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63320

--- Comment #2 from Jason Merrill  ---
Author: jason
Date: Mon Sep 22 19:22:11 2014
New Revision: 215478

URL: https://gcc.gnu.org/viewcvs?rev=215478&root=gcc&view=rev
Log:
PR c++/63320
PR c++/60463
PR c++/60755
* lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
not finding 'this'.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this19.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/lambda.c
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C


[Bug c++/60463] Lambda function can call a non-const member function with const this

2014-09-22 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60463

--- Comment #4 from Jason Merrill  ---
Author: jason
Date: Mon Sep 22 19:22:11 2014
New Revision: 215478

URL: https://gcc.gnu.org/viewcvs?rev=215478&root=gcc&view=rev
Log:
PR c++/63320
PR c++/60463
PR c++/60755
* lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
not finding 'this'.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this19.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/lambda.c
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C


[Bug c++/60755] lambda capturing `this` doesn't honor const qualifier of the enclosing member function

2014-09-22 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60755

--- Comment #5 from Jason Merrill  ---
Author: jason
Date: Mon Sep 22 19:22:11 2014
New Revision: 215478

URL: https://gcc.gnu.org/viewcvs?rev=215478&root=gcc&view=rev
Log:
PR c++/63320
PR c++/60463
PR c++/60755
* lambda.c (maybe_resolve_dummy, lambda_expr_this_capture): Handle
not finding 'this'.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this19.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/lambda.c
trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C


[Bug c++/63320] [5 Regression] bogus ‘this’ was not captured for this lambda function error

2014-09-22 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63320

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
   Target Milestone|--- |5.0

--- Comment #3 from Jason Merrill  ---
Fixed.


[Bug rtl-optimization/58968] Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math -funroll-loops

2014-09-22 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58968

Michael Meissner  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Michael Meissner  ---
It is fixed as of subversion revision 215333 (it was probably fixed a lot
longer, but I had 215333 lying around).


[Bug rtl-optimization/58968] Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math -funroll-loops

2014-09-22 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58968

--- Comment #7 from Michael Meissner  ---
Just to be clear, it is fixed in GCC 5 trunk sources.  I'll build it with the
GCC 4.9 branch as well.


[Bug c++/62219] [c++11] Spurious error for lambda in a friend function of a class template with a default template parameters

2014-09-22 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62219

--- Comment #4 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Mon Sep 22 19:48:54 2014
New Revision: 215483

URL: https://gcc.gnu.org/viewcvs?rev=215483&root=gcc&view=rev
Log:
/cp
2014-09-22  Paolo Carlini  

PR c++/62219
* pt.c (check_default_tmpl_args): Check LAMBDA_FUNCTION_P.

/testsuite
2014-09-22  Paolo Carlini  

PR c++/62219
* g++.dg/cpp0x/lambda/lambda-template14.C: New.

Added:
   
branches/gcc-4_9-branch/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template14.C
Modified:
branches/gcc-4_9-branch/gcc/cp/ChangeLog
branches/gcc-4_9-branch/gcc/cp/pt.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


[Bug c++/62219] [c++11] Spurious error for lambda in a friend function of a class template with a default template parameters

2014-09-22 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62219

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #5 from Paolo Carlini  ---
Fixed mainline and 4.9.2.


[Bug tree-optimization/63255] [5.0 regression] FAIL: gcc.dg/lto/ipareference2 c_lto_ipareference2_0.o-c_lto_ipareference2_1.o execute -O1 -flto -flto-partition=1to1 -fwhole-program

2014-09-22 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63255

Jan Hubicka  changed:

   What|Removed |Added

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

--- Comment #5 from Jan Hubicka  ---
Fixed.


[Bug c++/61825] [5 regression] g++.dg/cpp0x/static_assert9.C FAILs

2014-09-22 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61825

Jan Hubicka  changed:

   What|Removed |Added

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

--- Comment #10 from Jan Hubicka  ---
Fixed.


[Bug go/60406] recover.go: test13reflect2 test failure

2014-09-22 Thread boger at us dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60406

--- Comment #8 from boger at us dot ibm.com ---
Update on my previous work:

1) My previous update referred to a build that was done with the patches that
were submitted to gcc and patches that Dominik provided me for libffi.  I found
that if I only build with the gcc patches and don't use the libffi patches then
the recover.go testcase passes on ppc64le.


[Bug rtl-optimization/58968] Powerpc -mlra cannot compile ormas1.f in gamess Spec 2006 with -m32 -mcpu=power7 -O3 -mlra -w -ffast-math -funroll-loops

2014-09-22 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58968

--- Comment #8 from Michael Meissner  ---
The gamess benchmark also runs fine with the options when built with subversion
215404 on the gcc-4_9-branch


[Bug preprocessor/63337] Hexadecimal exponent: improvements to error message

2014-09-22 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63337

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to dmalcolm from comment #0)
> As discussed in the thread here:
>   https://gcc.gnu.org/ml/gcc/2014-09/msg00282.html
> if the user mistakenly tries to use the "e" suffix for a exponent marker
> with a hexadecimal constant, the warning could be improved.
> 
> $ cat /tmp/foo.c
> float f = 0x3ffe+63;

Except the user (that would be me) wasn't using e as an exponent
marker.  The user was adding two int values as in

int i;
i = 0x3ffe+63;  /* Except for an oddity of C, this is 16383+63 */

-- 
steve


[Bug target/63250] Complex fp16 arithmetic uses nonexistent libgcc functions

2014-09-22 Thread jsm28 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63250

--- Comment #1 from Joseph S. Myers  ---
Author: jsm28
Date: Tue Sep 23 00:48:46 2014
New Revision: 215491

URL: https://gcc.gnu.org/viewcvs?rev=215491&root=gcc&view=rev
Log:
Remove LIBGCC2_LONG_DOUBLE_TYPE_SIZE target macro.

This patch removes the target macro LIBGCC2_LONG_DOUBLE_TYPE_SIZE.

After recent changes, this macro was used in two ways in libgcc: to
determine the mode of long double in dfp-bit.h, and to determine
whether a particular mode has excess precision for use in complex
multiplication.

The former is concerned specifically with long double: it relates to
use of strtold for converting between decimal and binary floating
point.  This is replaced by comparing __LDBL_MANT_DIG__ with the
appropriate __LIBGCC_*_MANT_DIG__ macro.  The latter is replaced
__LIBGCC_*_EXCESS_PRECISION__ predefined macros.

Remarks:

* Comparing (__LDBL_MANT_DIG__ == __LIBGCC_XF_MANT_DIG__) is more
  fragile than it looks; it's possible for XFmode to have 53-bit
  mantissa (TARGET_96_ROUND_53_LONG_DOUBLE, on FreeBSD and
  DragonFlyBSD 32-bit), in which case such a comparison would not
  distinguish XFmode and DFmode as possible modes for long double.
  Fortunately, no target supporting that form of XFmode also supports
  long double = double (but if some target did, we'd need e.g. an
  additional macro giving the exponent range of each mode).

  Furthermore, this code doesn't actually get used for x86 (or any
  other target with XFmode support), because x86 uses BID not DPD and
  BID has its own conversion code (which handles conversions for both
  XFmode and TFmode without needing to go via strtold).  And FreeBSD
  and DragonFlyBSD aren't among the targets with DFP support.  So
  while in principle this code is fragile and it's a deficiency that
  it can't support both XFmode and TFmode at once (something that
  can't be solved with the string conversion approach without libc
  having TS 18661 functions such as strtof128), all these issues
  should not be a problem in practice.

* If other cases of excess precision are supported in future, the code
  for defining __LIBGCC_*_EXCESS_PRECISION__ may need updating.
  Although the most likely such cases might not actually involve
  excess precision for any mode used in libgcc - FLT_EVAL_METHOD being
  32 to do _Float16 arithmetic on _Float32 should have the effect of
  _Complex _Float16 arithmetic using __mulsc3 and __divsc3, rather
  than currently nonexistent __mulhc3 and __divhc3 as in bug 63250 for
  ARM.

* As has been noted in the context of simultaneous support for
  __float128 and __ibm128 on Power, the semantics of macros such as
  LONG_DOUBLE_TYPE_SIZE are problematic because they rely on a
  poorly-defined precision value for floating-point modes (which seems
  to be intended as the number of significant bits in the
  representation, e.g. 80 for XFmode which may be either 12 or 16
  bytes) uniquely identifying a mode (although defining an arbitrarily
  different value for one of the modes you wish to distinguish may
  work as a hack).  It would be cleaner to have a target hook that
  gives a machine mode directly for float, double and long double,
  rather than going via these precision values.  By eliminating all
  use of these macros (FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE,
  LONG_DOUBLE_TYPE_SIZE) from code built for the target, this patch
  facilitates such a conversion to a hook (which I suppose would take
  some suitable enum as an argument to identify which of the three
  types to return a mode for).

  (The issue of multiple type support for DFP conversions would apply
  in that Power case.
   doesn't
  seem to touch on it, but it would seem reasonable to punt on it
  initially as hard to fix.  There would also be the issue of getting
  functions such as __powikf2, __mulkc3, __divkc3 defined, but that's
  rather easier to address.)

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.

gcc:
* doc/tm.texi.in (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* doc/tm.texi: Regenerate.
* system.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Poison.
* config/alpha/alpha.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/i386/i386-interix.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE):
Remove.
* config/i386/i386.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/i386/rtemself.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/ia64/ia64.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/m68k/m68k.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/m68k/netbsd-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE):
Remove.
* config/mips/mips.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/mips/n32-elf.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/msp430/msp430.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/rl78/rl78.h (LIBGCC2_LONG_DOUBLE_TYPE_SIZE): Remove.
* config/rs6000/rs6000.h (LIBGCC2_LONG_DOUBLE_TYPE_SI

[Bug c/63338] New: Compiling large amounts of large switch cases takes a large amount of time

2014-09-22 Thread sstewartgallus00 at mylangara dot bc.ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63338

Bug ID: 63338
   Summary: Compiling large amounts of large switch cases takes a
large amount of time
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sstewartgallus00 at mylangara dot bc.ca

Compiling a large amount of large switch cases takes a really large
amount of time. In the attached code I did two things which caused and
justify the large amounts of large switch cases. First, I emulated
computed gotos in a portable way by using a macro that expands to a
switch case that jumps to a label and second I optimized dispatching
of return value registers for an intepreter by folding the return
value register selection into the instruction dispatching. The
original source is at
https://gitorious.org/uvm/uvm/source/9c8afcef3b3e87a81ff0b948fc9525cf8ec82e77:src/vm/module.c
and the preprocessed file is attached here.

I think that this specific case might be optimizable to be
accomplished in a reasonable amount of time so I thought I might as
well ask but if compiling this case is too difficult that's fine then.

Thank you,
Steven Stewart-Gallus


[Bug c/63338] Compiling large amounts of large switch cases takes a large amount of time

2014-09-22 Thread sstewartgallus00 at mylangara dot bc.ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63338

--- Comment #1 from Steven Stewart-Gallus  ---
Created attachment 33535
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33535&action=edit
Preprocessed source code


[Bug middle-end/63338] Compiling large amounts of large switch cases takes a large amount of time

2014-09-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63338

Andrew Pinski  changed:

   What|Removed |Added

  Component|c   |middle-end

--- Comment #2 from Andrew Pinski  ---
What version of GCC and on which target?


[Bug testsuite/61606] About GCC install, testing step (mostly check...)

2014-09-22 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61606

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2014-09-23
 CC||kargl at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from kargl at gcc dot gnu.org ---
(In reply to Fernando G. Tinetti from comment #0)
> Hi,
> 
> I'm making my own todo list for GCC install from sources, given that at some
> point I would like to contribute to gfortran, if possible (I'm rather far
> from it right now). Just to be clear, my todo list to install from sources
> is at
> http://fernando.usr.me/GCC-gfortran-install.html
> (maybe it would be useful some day for enhancing the online documentation...
> maybe not...).
> 

Please the installation instructions at https://gcc.gnu.org/install/
Your custom installation method as outlines in your blog above is
clearly broken.

-- 
steve


[Bug c++/63339] New: "using constructors" from virtual bases are implicitly deleted

2014-09-22 Thread jobnoorman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63339

Bug ID: 63339
   Summary: "using constructors" from virtual bases are implicitly
deleted
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jobnoorman at gmail dot com

GCC implicitly deletes constructors pulled from a virtual base class with a
"using" directive. The error indicates GCC thinks the default definition would
be ill-formed.

Although I'm not completely sure this is a bug, I'm filing it as such since a
quick skim through section 7.3.4 and 12.9 of N3337 revealed no reason why
"using" a constructor from a virtual base should be disallowed. Also, Clang
compiles the example code just fine.

Here is a small piece of code that reproduces this issue:

struct A
{
A(int i) {}
};

struct B : virtual A
{
using A::A;
};

void f()
{
B b{5};
}

And the error produced by GCC:

$ g++-4.9 -c -std=c++11 test.cpp
test.cpp: In function ‘void f()’:
test.cpp:13:10: error: use of deleted function ‘B::B(int)’
 B b{5};
  ^
test.cpp:8:14: note: ‘B::B(int)’ is implicitly deleted because the default
definition would be ill-formed:
 using A::A;
  ^
test.cpp:8:14: error: no matching function for call to ‘A::A()’
test.cpp:8:14: note: candidates are:
test.cpp:3:5: note: A::A(int)
 A(int i) {}
 ^
test.cpp:3:5: note:   candidate expects 1 argument, 0 provided
test.cpp:1:8: note: constexpr A::A(const A&)
 struct A
^
test.cpp:1:8: note:   candidate expects 1 argument, 0 provided
test.cpp:1:8: note: constexpr A::A(A&&)
test.cpp:1:8: note:   candidate expects 1 argument, 0 provided

Further information:
$ g++-4.9 -v
Using built-in specs.
COLLECT_GCC=g++-4.9
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.9.1-3ubuntu2~14.04.1' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.1 (Ubuntu 4.9.1-3ubuntu2~14.04.1)

[Bug c++/58751] [C++11] Inheriting constructors do not work properly with virtual inheritance.

2014-09-22 Thread jobnoorman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58751

Job Noorman  changed:

   What|Removed |Added

 CC||jobnoorman at gmail dot com

--- Comment #1 from Job Noorman  ---
*** Bug 63339 has been marked as a duplicate of this bug. ***


[Bug c++/63339] "using constructors" from virtual bases are implicitly deleted

2014-09-22 Thread jobnoorman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63339

Job Noorman  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Job Noorman  ---
Duplicate of 58751.

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


[Bug c++/58751] [C++11] Inheriting constructors do not work properly with virtual inheritance.

2014-09-22 Thread jobnoorman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58751

--- Comment #2 from Job Noorman  ---
I can also confirm that this is reproducible with GCC 4.9.

Also note that Clang *does* accept this code.