[Bug middle-end/62078] [5 Regression] ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 2 with -fdelete-dead-exceptions

2014-08-15 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62078

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-08-15
 Ever confirmed|0   |1


[Bug middle-end/62078] [5 Regression] ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 2 with -fdelete-dead-exceptions

2014-08-15 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62078

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu.org,
   ||mpolacek at gcc dot gnu.org
  Known to fail|4.10.0  |5.0

--- Comment #2 from Marek Polacek mpolacek at gcc dot gnu.org ---
Started with r212424.


[Bug tree-optimization/62151] New: wrong code at -O2 and -O3 on x86_64-linux-gnu

2014-08-15 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62151

Bug ID: 62151
   Summary: wrong code at -O2 and -O3 on x86_64-linux-gnu
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu

The current gcc trunk miscompiles the following code on x86_64-linux-gnu at -O2
and -O3 in both 32-bit and 64-bit modes.

This is a regression from 4.9.x. 

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.10.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 4.10.0 20140814 (experimental) [trunk revision 213937] (GCC) 
$ 
$ gcc-trunk -Os small.c; a.out
$ gcc-4.9 -O2 small.c; a.out
$ 
$ gcc-trunk -O2 small.c; a.out
Aborted (core dumped)
$ gcc-trunk -O3 small.c; a.out
Aborted (core dumped)
$ 





int a, c, d, e, f, g, h, i;
short b;

int
fn1 ()
{
  b = 0;
  for (;;)
{
  int j[2];
  j[f] = 0;
  if (h)
d = 0;
  else
{
  for (; f; f++)
;
  for (a = 0; a  1; a++)
for (;;)
  {
i = b  ((b ^ 1)  83647) ? b : b - 1;
g = 1 ? i : 0;
e = j[0];
if (c)
  break;
return 0;
  }
}
}
}

int
main ()
{
  fn1 ();
  if (g != -1) 
__builtin_abort (); 
  return 0;
}


[Bug c++/62152] New: ICE caused by using __builtin_ia32_pause() inside C++11 noexcept functions on Windows

2014-08-15 Thread lh_mouse at 126 dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62152

Bug ID: 62152
   Summary: ICE caused by using __builtin_ia32_pause() inside
C++11 noexcept functions on Windows
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: lh_mouse at 126 dot com

// ice.cpp
void foo() noexcept {
__builtin_ia32_pause();
// also reproducable with ::_mm_pause(); (requires #include immintrins.h)
}
// EOF

The above code will result in an ICE when compiled to i686 code:

E:\Desktopg++ ice.cpp -std=c++14 -m32 -c
ice.cpp: In function 'void foo()':
ice.cpp:3:1: internal compiler error: in ix86_compute_frame_layout, at
config/i386/i386.c:9510
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See http://sourceforge.net/projects/mingw-w64 for instructions.

If compiled to x86_64 code it won't ICE on Windows.


[Bug tree-optimization/62151] [5 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu

2014-08-15 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62151

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-08-15
 CC||mpolacek at gcc dot gnu.org,
   ||zhenqiang.chen at linaro dot 
org
Summary|wrong code at -O2 and -O3   |[5 Regression] wrong code
   |on x86_64-linux-gnu |at -O2 and -O3 on
   ||x86_64-linux-gnu
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek mpolacek at gcc dot gnu.org ---
Started with r211885.


[Bug tree-optimization/62151] [5 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu

2014-08-15 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62151

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |5.0


[Bug middle-end/62092] libgomp.c++/target-2.C FAIL while compiling for OpenMP 4.0 offload target

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62092

--- Comment #3 from Jakub Jelinek jakub at gcc dot gnu.org ---
Author: jakub
Date: Fri Aug 15 07:40:03 2014
New Revision: 214001

URL: https://gcc.gnu.org/viewcvs?rev=214001root=gccview=rev
Log:
PR middle-end/62092
* gimplify.c (gimplify_adjust_omp_clauses_1): Don't remove
OMP_CLAUSE_SHARED for global vars if the global var is mentioned
in OMP_CLAUSE_MAP in some outer target region.

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


[Bug middle-end/62092] libgomp.c++/target-2.C FAIL while compiling for OpenMP 4.0 offload target

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62092

--- Comment #4 from Jakub Jelinek jakub at gcc dot gnu.org ---
Author: jakub
Date: Fri Aug 15 07:40:37 2014
New Revision: 214002

URL: https://gcc.gnu.org/viewcvs?rev=214002root=gccview=rev
Log:
PR middle-end/62092
* gimplify.c (gimplify_adjust_omp_clauses_1): Don't remove
OMP_CLAUSE_SHARED for global vars if the global var is mentioned
in OMP_CLAUSE_MAP in some outer target region.

Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/gimplify.c


[Bug fortran/62107] libgomp.fortran/target2.f90 error while compiling for OpenMP 4.0 offload target

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62107

--- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org ---
Author: jakub
Date: Fri Aug 15 07:41:06 2014
New Revision: 214003

URL: https://gcc.gnu.org/viewcvs?rev=214003root=gccview=rev
Log:
PR fortran/62107
* trans-openmp.c (gfc_omp_finish_clause): Handle scalar pointer
or allocatable passed by reference.
(gfc_trans_omp_clauses) case OMP_LIST_MAP: Likewise.

Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-openmp.c


[Bug fortran/62107] libgomp.fortran/target2.f90 error while compiling for OpenMP 4.0 offload target

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62107

--- Comment #6 from Jakub Jelinek jakub at gcc dot gnu.org ---
Author: jakub
Date: Fri Aug 15 07:41:29 2014
New Revision: 214004

URL: https://gcc.gnu.org/viewcvs?rev=214004root=gccview=rev
Log:
PR fortran/62107
* trans-openmp.c (gfc_omp_finish_clause): Handle scalar pointer
or allocatable passed by reference.
(gfc_trans_omp_clauses) case OMP_LIST_MAP: Likewise.

Modified:
branches/gcc-4_9-branch/gcc/fortran/ChangeLog
branches/gcc-4_9-branch/gcc/fortran/trans-openmp.c


[Bug rtl-optimization/62151] [5 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu

2014-08-15 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62151

--- Comment #2 from Marek Polacek mpolacek at gcc dot gnu.org ---
Seems like with -fno-move-loop-invariants even gcc 4.9 miscompiles this.


[Bug middle-end/62092] libgomp.c++/target-2.C FAIL while compiling for OpenMP 4.0 offload target

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62092

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC|jakub at redhat dot com|
 Resolution|--- |FIXED

--- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org ---
Fixed.


[Bug fortran/62107] libgomp.fortran/target2.f90 error while compiling for OpenMP 4.0 offload target

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62107

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org ---
Fixed.


[Bug tree-optimization/62031] [4.8/4.9/5 Regression] Different results between O2 and O2 -fpredictive-commoning

2014-08-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62031

--- Comment #6 from Richard Biener rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Fri Aug 15 07:50:40 2014
New Revision: 214006

URL: https://gcc.gnu.org/viewcvs?rev=214006root=gccview=rev
Log:
2014-08-15  Richard Biener  rguent...@suse.de

PR tree-optimization/62031
* tree-data-ref.c (dr_analyze_indices): Do not set
DR_UNCONSTRAINED_BASE.
(dr_may_alias_p): All indirect accesses have to go the
formerly DR_UNCONSTRAINED_BASE path.
* tree-data-ref.h (struct indices): Remove
unconstrained_base member.
(DR_UNCONSTRAINED_BASE): Remove.

* gcc.dg/torture/pr62031.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr62031.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-data-ref.c
trunk/gcc/tree-data-ref.h


[Bug tree-optimization/13962] [tree-ssa] make fold use alias information to optimize pointer comparisons

2014-08-15 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13962

--- Comment #8 from rguenther at suse dot de rguenther at suse dot de ---
On Thu, 14 Aug 2014, glisse at gcc dot gnu.org wrote:

 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13962
 
 --- Comment #7 from Marc Glisse glisse at gcc dot gnu.org ---
 While looking at some unrelated issue, I noticed the following:
 
   _41 = operator new (28);
 ...
   if (_41 != _S_empty_rep_storage)
 
 which happens with a simple use of std::string (with some extra inlining).
 __builtin_malloc(42)==var is not optimized either, so it isn't (only) an 
 issue
 with operator new.
 
 If the general case is too dangerous, maybe there is at least some subset that
 could safely be optimized?

Well, not sure if really dangerous, but yes, doing pointer against
address-of-decl disambiguation should be easily possible.

I'll try to hack sth together later today.


[Bug rtl-optimization/62151] [5 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62151

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 ---
With -O3 -fno-move-loop-invariants it started with r208165.


[Bug rtl-optimization/62151] [5 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu

2014-08-15 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62151

amker at gcc dot gnu.org changed:

   What|Removed |Added

 CC||amker at gcc dot gnu.org

--- Comment #4 from amker at gcc dot gnu.org ---
(In reply to Jakub Jelinek from comment #3)
 With -O3 -fno-move-loop-invariants it started with r208165.

It's my checkin, I shall have a look.
Thanks.


[Bug c++/62101] deleted definitions of friend functions are rejected

2014-08-15 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62101

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

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

--- Comment #2 from Paolo Carlini paolo.carlini at oracle dot com ---
Fixed.


[Bug tree-optimization/13962] [tree-ssa] make fold use alias information to optimize pointer comparisons

2014-08-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13962

--- Comment #9 from Richard Biener rguenth at gcc dot gnu.org ---
Created attachment 6
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=6action=edit
patch

Like this - does it help the particular case?

Note that one issue is that points-to doesn't track NULL-ness reliably
(like may-point to zero if it may point to a weak decl), and we drop
maybe-NULL-ness because we don't use it.  Likewise we don't keep track
of pointers to CONST_DECLs or LABEL_DECLs or FUNCTION_DECLs (we simply
drop them on the floor rather than treating them as anything).

The patch doesn't bootstrap which means it probably reveals bugs in
points-to.  This is what I meant with dangerous ;)


[Bug fortran/62142] [4.9/5 Regression] internal compiler error: Segmentation fault (X = X - L*floor(X/L))

2014-08-15 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62142

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

   What|Removed |Added

 Status|UNCONFIRMED |NEW
  Known to work||4.8.3
   Keywords||ice-on-invalid-code,
   ||ice-on-valid-code
   Last reconfirmed||2014-08-15
 CC||tkoenig at gcc dot gnu.org
 Ever confirmed|0   |1
Summary|internal compiler error:|[4.9/5 Regression] internal
   |Segmentation fault (X = X - |compiler error:
   |L*floor(X/L))   |Segmentation fault (X = X -
   ||L*floor(X/L))
  Known to fail||4.9.1, 5.0

--- Comment #4 from Dominique d'Humieres dominiq at lps dot ens.fr ---
The codes in comments 0, 1, and 2 compile with gfortran 4.8, but not with 4.9
nor trunk (5.0). Revision r201916 (2013-08-22) is OK, r202111 (2013-08-30)
gives the ICE, likely r202070.


[Bug fortran/62142] [4.9/5 Regression] internal compiler error: Segmentation fault (X = X - L*floor(X/L))

2014-08-15 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62142

--- Comment #5 from Dominique d'Humieres dominiq at lps dot ens.fr ---
I also get an ICE for

 X = ceiling(X)

and

 X = aint(X)

but not if I replace floor with sin or real.


[Bug ipa/61800] [5 Regression] ICE: Segmentation fault during Firefox build

2014-08-15 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61800

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-08-15
 Ever confirmed|0   |1

--- Comment #2 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
Testcase from comment2 now passes.

But here's a new variant:

markus@x4 xslt % cat test.ii
#pragma GCC visibility push(hidden)
class A
{
public:
  unsigned long m_fn1 () const;
};
class B;
class C
{
public:
  ;
  virtual bool m_fn2 (void) = 0;
};
class D
{
  virtual bool m_fn3 (const int p1, B *p2) = 0;
};
class F : public D
{
  bool m_fn3 (const int p1, B *p2);
  A mPredicates;
};
class B
{
};
class G : public B
{
  virtual unsigned int m_fn4 () = 0;
};
class H : public G
{
public:
  int txNodeSetContext_aContextNodeSet;
  H (B *p1) {}
  int
  m_fn5 ()
  {
return mPosition  m_fn4 ();
  }
  unsigned int m_fn4 ();
  unsigned int mPosition;
};

unsigned int a;
C *b;
bool
F::m_fn3 (const int p1, B *p2)
{
  if (!b-m_fn2 ())
return false;
  unsigned int c = mPredicates.m_fn1 ();
  for (1; 1  c; ++a)
{
  H d (p2);
  while (d.m_fn5 ())
{
  do
{
}
  while (0);
}
}
}

markus@x4 xslt % /var/tmp/gcc_test/usr/local/bin/c++ -c -O2 test.ii
test.ii: In member function ‘virtual bool F::m_fn3(const int, B*)’:
test.ii:63:1: internal compiler error: Segmentation fault
 }
 ^
0xb9ddcf crash_signal
../../gcc/gcc/toplev.c:337
0x9fd5ea decl_maybe_in_construction_p(tree_node*, tree_node*,
gimple_statement_base*, tree_node*)
../../gcc/gcc/ipa-devirt.c:2214
0x9fe561 get_polymorphic_call_info(tree_node*, tree_node*, tree_node**, long*,
ipa_polymorphic_call_context*, gimple_statement_base*)
../../gcc/gcc/ipa-devirt.c:2436
0x848244 cgraph_node::create_indirect_edge(gimple_statement_base*, int, long,
int)
../../gcc/gcc/cgraph.c:968
0x852af1 cgraph_clone_edge(cgraph_edge*, cgraph_node*, gimple_statement_base*,
unsigned int, long, int, bool)
../../gcc/gcc/cgraphclones.c:139
0x85427f cgraph_node::create_version_clone(tree_node*, veccgraph_edge*,
va_heap, vl_ptr, bitmap_head*)
../../gcc/gcc/cgraphclones.c:876
0x8543c7 cgraph_node::create_version_clone_with_body(veccgraph_edge*, va_heap,
vl_ptr, vecipa_replace_map*, va_gc, vl_embed*, bitmap_head*, bool,
bitmap_head*, basic_block_def*, char const*)
../../gcc/gcc/cgraphclones.c:943
0x10d1adb split_function
../../gcc/gcc/ipa-split.c:1235
0x10d5d8e execute_split_functions
../../gcc/gcc/ipa-split.c:1636
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.
markus@x4 xslt %

[Bug tree-optimization/62114] [graphite] ICE using -floop-parallelize-all and -ffast-math

2014-08-15 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62114

Matthias Klose doko at gcc dot gnu.org changed:

   What|Removed |Added

 CC||doko at gcc dot gnu.org
  Known to fail||4.8.3

--- Comment #4 from Matthias Klose doko at gcc dot gnu.org ---
this test case fails on the 4.8 and 4.9 branches, but succeeds with trunk
20140815.

$ cat tst.c  
int a, b;
fn1() {
  for (; a; a++)
b |= 1;
}

$ gcc -c -Ofast -floop-parallelize-all tst.c   tst.c: In function 'fn1':
tst.c:2:1: internal compiler error: Segmentation fault
 fn1() {
 ^
Please submit a full bug report,
with preprocessed source if appropriate.


(gdb) bt
#0  0x00cdf3ea in compute_deps(scop*, vecpoly_bb*, va_heap, vl_ptr,
isl_union_map**, isl_union_map**, isl_union_map**, isl_union_map**,
isl_union_map**, isl_union_map**, isl_union_map**, isl_union_map**,
isl_union_map**, isl_union_map**, isl_union_map**, isl_union_map**) ()
#1  0x00cdf913 in loop_is_parallel_p(loop*, hash_tablebb_pbb_hasher,
xcallocator, int)
()
#2  0x00cdd9fd in ?? ()
#3  0x00cddd72 in gloog(scop*, hash_tablebb_pbb_hasher, xcallocator)
()
#4  0x00cdac09 in graphite_transform_loops() ()
#5  0x00cdb0f7 in ?? ()
#6  0x00818b3b in execute_one_pass(opt_pass*) ()
#7  0x00818dd6 in execute_pass_list(opt_pass*) ()
#8  0x00818de8 in execute_pass_list(opt_pass*) ()
#9  0x00818de8 in execute_pass_list(opt_pass*) ()
#10 0x00818de8 in execute_pass_list(opt_pass*) ()
#11 0x0063f656 in ?? ()
#12 0x00640f4d in compile() ()
#13 0x006413a5 in finalize_compilation_unit() ()
#14 0x005648ec in c_write_global_declarations() ()
#15 0x008b353d in ?? ()
#16 0x008b50d0 in toplev_main(int, char**) ()
#17 0x766e7b45 in __libc_start_main (main=0x552750 main, argc=18, 
argv=0x7fffe588, init=optimized out, fini=optimized out,
rtld_fini=optimized out, 
stack_end=0x7fffe578) at libc-start.c:287
#18 0x0055297f in _start ()


[Bug tree-optimization/13962] [tree-ssa] make fold use alias information to optimize pointer comparisons

2014-08-15 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13962

Marc Glisse glisse at gcc dot gnu.org changed:

   What|Removed |Added

 CC||glisse at gcc dot gnu.org

--- Comment #10 from Marc Glisse glisse at gcc dot gnu.org ---
(In reply to Richard Biener from comment #9)
 Created attachment 6 [details]
 patch
 
 Like this - does it help the particular case?

_S_empty_rep_storage has DECL_WEAK, so it doesn't help here :-(


[Bug c++/62153] New: warn for bool expression compared with integer different from 0/1

2014-08-15 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62153

Bug ID: 62153
   Summary: warn for bool expression compared with integer
different from 0/1
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: manu at gcc dot gnu.org

#define X(x) (x == 1)

void foo(void)
{
  int a;
  if (X(a) == 2) {
return;
  }
}

Clang++ warns for this by default:

test.c:6:12: warning: comparison of constant 2 with expression of type 'bool'
is always false [-Wtautological-constant-out-of-range-compare]
  if (X(a) == 2) {
   ^  ~


[Bug c++/62153] warn for bool expression compared with integer different from 0/1

2014-08-15 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62153

--- Comment #1 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
This should be enabled in GCC bootstrap:

https://gcc.gnu.org/ml/gcc-patches/2014-08/msg01555.html

[Bug libstdc++/62154] New: std::throw_with_nested should not require a polymorphic type

2014-08-15 Thread jaak at ristioja dot ee
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62154

Bug ID: 62154
   Summary: std::throw_with_nested should not require a
polymorphic type
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jaak at ristioja dot ee

#include exception
struct E { E(int) {} };
int main() { std::throw_with_nested(E(42)); return 0; }

Compiling with g++ -std=c++11 -Wall -Wextra. Tried with GCC 4.7.4, 4.8.3 and
4.9.1 and Clang.

In file included from
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.1/include/g++-v4/exception:163:0,
 from test.cpp:1:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.1/include/g++-v4/bits/nested_exception.h:
In instantiation of 'static const std::nested_exception*
std::__get_nested_helper_Ex::_S_get(const _Ex) [with _Ex = E]':
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.1/include/g++-v4/bits/nested_exception.h:104:51:
  required from 'const std::nested_exception* std::__get_nested_exception(const
_Ex) [with _Ex = E]'
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.1/include/g++-v4/bits/nested_exception.h:138:38:
  required from 'void std::throw_with_nested(_Ex) [with _Ex = E]'
test.cpp:6:31:   required from here
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.1/include/g++-v4/bits/nested_exception.h:90:59:
error: cannot dynamic_cast ' __ex' (of type 'const struct E*') to type 'const
class std::nested_exception*' (source type is not polymorphic)
   { return dynamic_castconst nested_exception*(__ex); }
   ^


[Bug rtl-optimization/62151] [5 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu

2014-08-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62151

--- Comment #5 from Richard Biener rguenth at gcc dot gnu.org ---
Note that probably also made a latent issue pop up.


[Bug rtl-optimization/62151] [5 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu

2014-08-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62151

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||wrong-code
   Priority|P3  |P1


[Bug c++/62155] New: ICE in tsubst_copy, at cp/pt.c:12544

2014-08-15 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62155

Bug ID: 62155
   Summary: ICE in tsubst_copy, at cp/pt.c:12544
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org

works on the trunk, fails on the 4.8 and 4.9 branches:

$ cat test.cc 
template typename T struct S {
  T i{[this] {}};
};

Sint s;

$ /usr/lib/gcc-snapshot/bin/g++ -std=c++11 -c test.cc
test.cc:5:8: error: cannot convert 'brace-enclosed initializer list' to 'int'
in initialization
 Sint s;
^
test.cc: In constructor 'constexpr Sint::S()':
test.cc:1:30: error: cannot convert 'brace-enclosed initializer list' to
'int' in initialization
 template typename T struct S {
  ^
test.cc: At global scope:
test.cc:5:8: note: synthesized method 'constexpr Sint::S()' first required
here 
 Sint s;
^

$ g++ -std=c++11 -c test.cc 
test.cc: In instantiation of 'struct Sint::lambda()':
test.cc:1:30:   required from here
test.cc:2:8: internal compiler error: in tsubst_copy, at cp/pt.c:12544
   T i{[this] {}};
^
Please submit a full bug report,
with preprocessed source if appropriate.


[Bug inline-asm/62144] Frame pointer required, but reserved error with -fomit-frame-pointer but only with -m32 -O2

2014-08-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62144

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-08-15
 CC||vmakarov at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
frame_pointer_needed is set by setup_can_eliminate.  Which means that desipte
-fomit-frame-pointer IRA is not able to eliminate the frame pointer?

Vlad?


[Bug fortran/62142] [4.9/5 Regression] internal compiler error: Segmentation fault (X = X - L*floor(X/L))

2014-08-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62142

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |4.9.2


[Bug middle-end/62140] [GCC-4.10.0][ASAN] ICE: : in build2_stat, at tree.c:4265

2014-08-15 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62140

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-08-15
Version|unknown |5.0
Summary|[GCC-4.10.0] ICE: : in  |[GCC-4.10.0][ASAN] ICE: :
   |build2_stat, at tree.c:4265 |in build2_stat, at
   ||tree.c:4265
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener rguenth at gcc dot gnu.org ---
Confirmed.


[Bug libstdc++/62154] std::throw_with_nested should not require a polymorphic type

2014-08-15 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62154

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-08-15
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org ---
The implementation conforms to
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2619.pdf but that's
not the same as the C++11 spec


[Bug bootstrap/62077] --with-build-config=bootstrap-lto fails

2014-08-15 Thread sven.c.dack at virginmedia dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62077

--- Comment #40 from Sven C. Dack sven.c.dack at virginmedia dot com ---
I ran benchmarks and got some unusual results. Or perhaps it is a regression?

I have created 4 versions of gcc and used these to timed the time it takes to
compile a linux kernel. The configuration of the 4 gcc's are:

CFLAGS='-pipe -O2 -march=native -fomit-frame-pointer -fno-builtin-memcmp'

default:
  configure ...
  make bootstrap

profiled:
  configure ...
  make profiledbootstrap

lto:
  configure ... --with-build-config=bootstrap-lto
  make bootstrap

lto-plugin:
  configure ... --with-build-config=bootstrap-lto
--with-boot-ldflags=-fuse-linker-plugin
  make bootstrap

The results are the averages (and deviations) of 5 runs with each compiler:

avg   stdev  %
default:282.86s0.56s, 0.20%100.00% (base)
profiled:   255.76s0.72s, 0.28%+10.60%
lto:282.80s0.16s, 0.06% +0.02%
lto-plugin: 285.41s0.49s, 0.17% -0.89%

The file sizes of the cc1's are:

default:84920k
profiled:   90176k
lto:71204k
lto-plugin: 60024k

So boot strapping with LTO does not make gcc faster, but only smaller and also
takes more time. It is almost as if I had used -Os (and not -O2).

With the linker plugin enabled does it actually link libgcc_s.so and
libstdc++.so dynamically to it, while for the other three it did not:

default cc1:
libmpc.so.3 = /home/sven/gcc-default/lib/libmpc.so.3
libmpfr.so.4 = /home/sven/gcc-default/lib/libmpfr.so.4
libgmp.so.10 = /home/sven/gcc-default/lib/libgmp.so.10
profiled cc1:
libmpc.so.3 = /home/sven/gcc-profiled/lib/libmpc.so.3
libmpfr.so.4 = /home/sven/gcc-profiled/lib/libmpfr.so.4
libgmp.so.10 = /home/sven/gcc-profiled/lib/libgmp.so.10
lto cc1:
libmpc.so.3 = /home/sven/gcc-lto/lib/libmpc.so.3
libmpfr.so.4 = /home/sven/gcc-lto/lib/libmpfr.so.4
libgmp.so.10 = /home/sven/gcc-lto/lib/libgmp.so.10
lto-plugin cc1:
libmpc.so.3 = /home/sven/gcc-lto-plugin/lib/libmpc.so.3
libmpfr.so.4 = /home/sven/gcc-lto-plugin/lib/libmpfr.so.4
libgmp.so.10 = /home/sven/gcc-lto-plugin/lib/libgmp.so.10
libstdc++.so.6 = /home/sven/gcc-lto-plugin/lib64/libstdc++.so.6
libgcc_s.so.1 = /home/sven/gcc-lto-plugin/lib64/libgcc_s.so.1

I will try doing the same but with statically linked compilers.


[Bug fortran/62131] [4.9/5 Regression] OpenMP: Subobject of an allocatable array not allowed in OMP ATOMIC

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62131

--- Comment #3 from Jakub Jelinek jakub at gcc dot gnu.org ---
Author: jakub
Date: Fri Aug 15 10:23:13 2014
New Revision: 214010

URL: https://gcc.gnu.org/viewcvs?rev=214010root=gccview=rev
Log:
PR fortran/62131
* openmp.c (resolve_omp_atomic): Only complain if code-expr1's attr
is allocatable, rather than whenever var-attr.allocatable.

* gfortran.dg/gomp/pr62131.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/gomp/pr62131.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/openmp.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/62131] [4.9/5 Regression] OpenMP: Subobject of an allocatable array not allowed in OMP ATOMIC

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62131

--- Comment #4 from Jakub Jelinek jakub at gcc dot gnu.org ---
Author: jakub
Date: Fri Aug 15 10:24:08 2014
New Revision: 214011

URL: https://gcc.gnu.org/viewcvs?rev=214011root=gccview=rev
Log:
PR fortran/62131
* openmp.c (resolve_omp_atomic): Only complain if code-expr1's attr
is allocatable, rather than whenever var-attr.allocatable.

* gfortran.dg/gomp/pr62131.f90: New test.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/gomp/pr62131.f90
Modified:
branches/gcc-4_9-branch/gcc/fortran/ChangeLog
branches/gcc-4_9-branch/gcc/fortran/openmp.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


[Bug bootstrap/62077] --with-build-config=bootstrap-lto fails

2014-08-15 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62077

--- Comment #41 from rguenther at suse dot de rguenther at suse dot de ---
On Fri, 15 Aug 2014, sven.c.dack at virginmedia dot com wrote:

 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62077
 
 --- Comment #40 from Sven C. Dack sven.c.dack at virginmedia dot com ---
 I ran benchmarks and got some unusual results. Or perhaps it is a regression?
 
 I have created 4 versions of gcc and used these to timed the time it takes to
 compile a linux kernel. The configuration of the 4 gcc's are:
 
 CFLAGS='-pipe -O2 -march=native -fomit-frame-pointer -fno-builtin-memcmp'
 
 default:
   configure ...
   make bootstrap
 
 profiled:
   configure ...
   make profiledbootstrap
 
 lto:
   configure ... --with-build-config=bootstrap-lto
   make bootstrap
 
 lto-plugin:
   configure ... --with-build-config=bootstrap-lto
 --with-boot-ldflags=-fuse-linker-plugin
   make bootstrap
 
 The results are the averages (and deviations) of 5 runs with each compiler:
 
 avg   stdev  %
 default:282.86s0.56s, 0.20%100.00% (base)
 profiled:   255.76s0.72s, 0.28%+10.60%
 lto:282.80s0.16s, 0.06% +0.02%
 lto-plugin: 285.41s0.49s, 0.17% -0.89%
 
 The file sizes of the cc1's are:
 
 default:84920k
 profiled:   90176k
 lto:71204k
 lto-plugin: 60024k
 
 So boot strapping with LTO does not make gcc faster, but only smaller and also
 takes more time. It is almost as if I had used -Os (and not -O2).

Most interesting is bootstrap-lto and make profiledbootstrap.

 With the linker plugin enabled does it actually link libgcc_s.so and
 libstdc++.so dynamically to it, while for the other three it did not:

That looks odd.  Btw, -fuse-linker-plugin should be the default
if you have recent enough binutils.

Richard


[Bug c++/62153] warn for bool expression compared with integer different from 0/1

2014-08-15 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62153

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2014-08-15
 CC||mpolacek at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org
   Target Milestone|--- |5.0
 Ever confirmed|0   |1

--- Comment #2 from Marek Polacek mpolacek at gcc dot gnu.org ---
Sounds good.  I'll look at it, so mine for now.  But the
-Wtautological-constant-out-of-range-compare name is too long - can't we name
it just e.g. -Wbool-compare?


[Bug lto/62032] FAIL: vsnprintf-chk.c execution, -O2 -flto -fno-use-linker-plugin -flto-partition=none

2014-08-15 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62032

amker at gcc dot gnu.org changed:

   What|Removed |Added

  Known to work|4.9.1   |
  Known to fail|4.10.0  |

--- Comment #7 from amker at gcc dot gnu.org ---
Should be fixed now.


[Bug bootstrap/62077] --with-build-config=bootstrap-lto fails

2014-08-15 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62077

--- Comment #42 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
(In reply to Sven C. Dack from comment #40)
 The results are the averages (and deviations) of 5 runs with each compiler:
 
 avg   stdev  %
 default:282.86s0.56s, 0.20%100.00% (base)
 profiled:   255.76s0.72s, 0.28%+10.60%
 lto:282.80s0.16s, 0.06% +0.02%
 lto-plugin: 285.41s0.49s, 0.17% -0.89%

Can you also try profiled+lto? This should in theory get you the fastes
compiler.


[Bug c++/62153] warn for bool expression compared with integer different from 0/1

2014-08-15 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62153

--- Comment #3 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
(In reply to Marek Polacek from comment #2)
 Sounds good.  I'll look at it, so mine for now.  But the
 -Wtautological-constant-out-of-range-compare name is too long - can't we
 name it just e.g. -Wbool-compare?

I agree it is too long. Wbool-compare sounds good to me.

If you can implement it for both C and C++ and put the testcases in
testsuite/c-c++-common/, that would be great.

[Bug c++/62153] warn for bool expression compared with integer different from 0/1

2014-08-15 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62153

--- Comment #4 from Marek Polacek mpolacek at gcc dot gnu.org ---
Sure, both FEs should have it.


[Bug bootstrap/62077] --with-build-config=bootstrap-lto fails

2014-08-15 Thread sven.c.dack at virginmedia dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62077

--- Comment #43 from Sven C. Dack sven.c.dack at virginmedia dot com ---
(In reply to Markus Trippelsdorf from comment #42)
 (In reply to Sven C. Dack from comment #40)
  The results are the averages (and deviations) of 5 runs with each compiler:
  
  avg   stdev  %
  default:282.86s0.56s, 0.20%100.00% (base)
  profiled:   255.76s0.72s, 0.28%+10.60%
  lto:282.80s0.16s, 0.06% +0.02%
  lto-plugin: 285.41s0.49s, 0.17% -0.89%
 
 Can you also try profiled+lto? This should in theory get you the fastes
 compiler.

I am already on it, but it will take a while.

I had assumed this would not work yet. I also read that with only LTO one would
get a faster compiler. Why is this not the case here?

The binutils I am using are:

$ ld --version
GNU ld (GNU Binutils) 2.24.51.20140703
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.


[Bug tree-optimization/62156] New: memcmp doesn't see through memcpy at compile-time

2014-08-15 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62156

Bug ID: 62156
   Summary: memcmp doesn't see through memcpy at compile-time
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: enhancement
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: glisse at gcc dot gnu.org

int f(){
  const char*a=abcdefghijkl;
  const char*b=acbdefghijkl;
  char*c=(char*)__builtin_malloc(42);
  __builtin_memcpy(c,b,13);
  return __builtin_memcmp(a,c,5);
}

We have no problem computing strlen(c) or memcmp(a,b,5) at compile-time, but we
don't manage to fold this. This type of code is what we get with std::string
when we inline everything.


[Bug bootstrap/62077] --with-build-config=bootstrap-lto fails

2014-08-15 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62077

--- Comment #44 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
(In reply to Sven C. Dack from comment #43)
 (In reply to Markus Trippelsdorf from comment #42)
  (In reply to Sven C. Dack from comment #40)
   The results are the averages (and deviations) of 5 runs with each 
   compiler:
   
   avg   stdev  %
   default:282.86s0.56s, 0.20%100.00% (base)
   profiled:   255.76s0.72s, 0.28%+10.60%
   lto:282.80s0.16s, 0.06% +0.02%
   lto-plugin: 285.41s0.49s, 0.17% -0.89%
  
  Can you also try profiled+lto? This should in theory get you the fastes
  compiler.
 
 I am already on it, but it will take a while.
 
 I had assumed this would not work yet. I also read that with only LTO one
 would get a faster compiler.

Not in my experience. As you've found out LTO is good for reducing 
binary sizes, but it really needs PGO to make sensible decisions.

BTW if you have TCMalloc installed on your machine, appending 
POSTSTAGE1_LDFLAGS += -l/usr/lib/libtcmalloc.so.4 to config/bootstrap-lto.mk
may give you an additional 8-10% speed boost (at least for big C++ projects,
I haven't measured kernel build times).


[Bug middle-end/62078] [5 Regression] ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 2 with -fdelete-dead-exceptions

2014-08-15 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62078

Eric Botcazou ebotcazou at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |UNCONFIRMED
 Ever confirmed|1   |0

--- Comment #3 from Eric Botcazou ebotcazou at gcc dot gnu.org ---
 Started with r212424.

r212424 reverted a bogus change that had disabled -fdelete-dead-exceptions.


[Bug middle-end/62078] [5 Regression] ICE: verify_flow_info failed: missing REG_EH_REGION note at the end of bb 2 with -fdelete-dead-exceptions

2014-08-15 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62078

Eric Botcazou ebotcazou at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1


[Bug fortran/62142] [4.9/5 Regression] internal compiler error: Segmentation fault (X = X - L*floor(X/L))

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62142

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek jakub at gcc dot gnu.org ---
Indeed, this regressed with r202070.


[Bug target/61878] Missing intrinsic functions in avx512intrin.h

2014-08-15 Thread tocarip at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61878

--- Comment #2 from tocarip at gcc dot gnu.org ---
Author: tocarip
Date: Fri Aug 15 12:47:41 2014
New Revision: 214019

URL: https://gcc.gnu.org/viewcvs?rev=214019root=gccview=rev
Log:
gcc/

PR target/61878
* config/i386/avx512fintrin.h (_mm512_mask_cmpge_epi32_mask): New.
(_mm512_mask_cmpge_epu32_mask): Ditto.
(_mm512_cmpge_epu32_mask): Ditto.
(_mm512_mask_cmpge_epi64_mask): Ditto.
(_mm512_cmpge_epi64_mask): Ditto.
(_mm512_mask_cmpge_epu64_mask): Ditto.
(_mm512_cmpge_epu64_mask): Ditto.
(_mm512_mask_cmple_epi32_mask): Ditto.
(_mm512_cmple_epi32_mask): Ditto.
(_mm512_mask_cmple_epu32_mask): Ditto.
(_mm512_cmple_epu32_mask): Ditto.
(_mm512_mask_cmple_epi64_mask): Ditto.
(_mm512_cmple_epi64_mask): Ditto.
(_mm512_mask_cmple_epu64_mask): Ditto.
(_mm512_cmple_epu64_mask): Ditto.
(_mm512_mask_cmplt_epi32_mask): Ditto.
(_mm512_cmplt_epi32_mask): Ditto.
(_mm512_mask_cmplt_epu32_mask): Ditto.
(_mm512_cmplt_epu32_mask): Ditto.
(_mm512_mask_cmplt_epi64_mask): Ditto.
(_mm512_cmplt_epi64_mask): Ditto.
(_mm512_mask_cmplt_epu64_mask): Ditto.
(_mm512_cmplt_epu64_mask): Ditto.
(_mm512_mask_cmpneq_epi32_mask): Ditto.
(_mm512_mask_cmpneq_epu32_mask): Ditto.
(_mm512_cmpneq_epu32_mask): Ditto.
(_mm512_mask_cmpneq_epi64_mask): Ditto.
(_mm512_cmpneq_epi64_mask): Ditto.
(_mm512_mask_cmpneq_epu64_mask): Ditto.
(_mm512_cmpneq_epu64_mask): Ditto.
(_mm512_castpd_ps): Ditto.
(_mm512_castpd_si512): Ditto.
(_mm512_castps_pd): Ditto.
(_mm512_castps_si512): Ditto.
(_mm512_castsi512_ps): Ditto.
(_mm512_castsi512_pd): Ditto.
(_mm512_castpd512_pd128): Ditto.
(_mm512_castps512_ps128): Ditto.
(_mm512_castsi512_si128): Ditto.
(_mm512_castpd512_pd256): Ditto.
(_mm512_castps512_ps256): Ditto.
(_mm512_castsi512_si256): Ditto.
(_mm512_castpd128_pd512): Ditto.
(_mm512_castps128_ps512): Ditto.
(_mm512_castsi128_si512): Ditto.
(_mm512_castpd256_pd512): Ditto.
(_mm512_castps256_ps512): Ditto.
(_mm512_castsi256_si512): Ditto.
(_mm512_cmpeq_epu32_mask): Ditto.
(_mm512_mask_cmpeq_epu32_mask): Ditto.
(_mm512_mask_cmpeq_epu64_mask): Ditto.
(_mm512_cmpeq_epu64_mask): Ditto.
(_mm512_cmpgt_epu32_mask): Ditto.
(_mm512_mask_cmpgt_epu32_mask): Ditto.
(_mm512_mask_cmpgt_epu64_mask): Ditto.
(_mm512_cmpgt_epu64_mask): Ditto.
* config/i386/i386-builtin-types.def: Add V16SF_FTYPE_V8SF,
V16SI_FTYPE_V8SI, V16SI_FTYPE_V4SI, V8DF_FTYPE_V2DF.
* config/i386/i386.c (enum ix86_builtins): Add
IX86_BUILTIN_SI512_SI256, IX86_BUILTIN_PD512_PD256,
IX86_BUILTIN_PS512_PS256, IX86_BUILTIN_SI512_SI,
IX86_BUILTIN_PD512_PD, IX86_BUILTIN_PS512_PS.
(bdesc_args): Add __builtin_ia32_si512_256si,
__builtin_ia32_ps512_256ps, __builtin_ia32_pd512_256pd,
__builtin_ia32_si512_si, __builtin_ia32_ps512_ps,
__builtin_ia32_pd512_pd.
(ix86_expand_args_builtin): Handle new FTYPEs.
* config/i386/sse.md (castmode): Add 512-bit modes.
(AVX512MODE2P): New.
(avx512f_castmodeavxsizesuffix_castmode): New.
(avx512f_castmodeavxsizesuffix_256castmode): Ditto.


gcc/testsuite/

PR target/61878
* gcc.target/i386/avx512f-typecast-1.c: New test.
* gcc.target/i386/avx512f-vpcmpequd-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpequd-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpequq-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpequq-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpged-1.c: Add new intrinsic.
* gcc.target/i386/avx512f-vpcmpged-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpgeq-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpgeq-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpgeud-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpgeud-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpgeuq-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpgeuq-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpgtud-1.c: New test.
* gcc.target/i386/avx512f-vpcmpgtud-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpgtuq-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpgtuq-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpled-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpled-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpleq-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpleq-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpleud-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpleud-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpleuq-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpleuq-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpltd-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpltd-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpltq-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpltq-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpltud-1.c: Ditto.
* gcc.target/i386/avx512f-vpcmpltud-2.c: Ditto.
* gcc.target/i386/avx512f-vpcmpltuq-1.c: Ditto.
* 

[Bug c/44077] -Wtype-limits fails to warn for _Bool comparisons

2014-08-15 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44077

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

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||manu at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #3 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
Duplicate. We should warn for any comparison of boolean with something
different than 0/1.

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

[Bug c++/62153] warn for bool expression compared with integer different from 0/1

2014-08-15 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62153

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

   What|Removed |Added

 CC||sirl at gcc dot gnu.org

--- Comment #5 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
*** Bug 44077 has been marked as a duplicate of this bug. ***

[Bug c++/62072] [4.9/5 regression] No SFINAE performed for function type

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62072

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #1 from Jakub Jelinek jakub at gcc dot gnu.org ---
This started to be rejected with r212410.


[Bug c++/62072] [5 regression] No SFINAE performed for function type

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62072

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|4.9.2   |5.0
Summary|[4.9/5 regression] No   |[5 regression] No SFINAE
   |SFINAE performed for|performed for function type
   |function type   |


[Bug c++/59002] [meta-bug] Access checking in templates

2014-08-15 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59002

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-08-15
 Depends on||22149
 Ever confirmed|0   |1


[Bug middle-end/62140] [GCC-4.10.0][ASAN] ICE: : in build2_stat, at tree.c:4265

2014-08-15 Thread y.gribov at samsung dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62140

Yury Gribov y.gribov at samsung dot com changed:

   What|Removed |Added

 CC||y.gribov at samsung dot com

--- Comment #2 from Yury Gribov y.gribov at samsung dot com ---
Created attachment 7
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=7action=edit
Short repro

Same on x86_64-unknown-linux-gnu. Memcmp is called with int-typed length
parameter which upsets build of POINTER_PLUS_EXPR which expects 64-bit unsigned
type. I'm attaching a short repro.


[Bug target/62123] [4.9 Regression] internal compiler error: output_operand: invalid expression as operand with option -std=c++11 and using std::complex

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62123

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #2 from Jakub Jelinek jakub at gcc dot gnu.org ---
On the trunk, started to ICE with r212439 (so likely on 4.9 branch with
r212440).
On the trunk the ICE got fixed with r213688, but that change has not been
applied to the 4.9 branch yet apparently.


[Bug c++/61994] [4.9 Regression] constexpr vector array ICE

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61994

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||paul.freitag@bruker-biospin
   ||.de

--- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org ---
*** Bug 62123 has been marked as a duplicate of this bug. ***


[Bug target/62123] [4.9 Regression] internal compiler error: output_operand: invalid expression as operand with option -std=c++11 and using std::complex

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62123

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #3 from Jakub Jelinek jakub at gcc dot gnu.org ---
Aha, but that has been applied to 4.9 branch too, seems the only problem is
that I had my 4.9 tree a few days old.  Seems to work fine with current 4.9
branch.

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


[Bug c++/62129] [4.9/5 Regression] internal compiler error: in output_constant, at varasm.c:4755

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62129

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek jakub at gcc dot gnu.org ---
Yeah, and this one wasn't fixed with r213688.


[Bug c++/62129] [4.9/5 Regression] internal compiler error: in output_constant, at varasm.c:4755

2014-08-15 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62129

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P1


[Bug sanitizer/62157] New: make distclean error when libsanitizer is configured not to build 'tsan'

2014-08-15 Thread Explorer09 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62157

Bug ID: 62157
   Summary: make distclean error when libsanitizer is configured
not to build 'tsan'
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: sanitizer
  Assignee: unassigned at gcc dot gnu.org
  Reporter: Explorer09 at gmail dot com
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org

Tested on GCC 4.9.1. (Host OS is Ubuntu 12.04.5 32-bit)

To reproduce:
1. Have a 32-bit operating system (or something that makes
ac_cv_sizeof_void_p!=8 )
2. mkdir libsanitizer-build ; cd libsanitizer-build
3. ../gcc-4.9.1/libsanitizer/configure --disable-multilib
(I know libsanitizer isn't meant to be configured this way, but I do this just
to demonstrate the error.)
Now notice that tsan/Makefile won't be generated.
4. make distclean

Actual result is something like this:
--
Making distclean in tsan
/bin/bash: line 26: cd: tsan: No such file or directory
make[2]: *** [distclean-recursive] Error 1
make[2]: Leaving directory
`/home/explorer/toolchain/gcc-build/i486-pc-linux-gnu/libsanitizer'
make[1]: *** [distclean-target-libsanitizer] Error 1
make[1]: Leaving directory `/home/explorer/toolchain/gcc-build'
make: *** [do-distclean] Error 2
--

I have to use make -k distclean to workaround problem like this when building
a cross-GCC.


[Bug c/62158] New: FAIL: scan-tree-dump-not optimized gimple_assign

2014-08-15 Thread sabrinadfs at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62158

Bug ID: 62158
   Summary: FAIL: scan-tree-dump-not optimized gimple_assign
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sabrinadfs at gmail dot com

GCC-4.10.0 (trunk)
x86_64-apple-darwin11.4.2

Running the following test:
make -s -C gcc check-gcc RUNTESTFLAGS=dg.exp=pr55027.c
--target_board=unix/-O0

GCC produced this failure:

FAIL: gcc.dg/pr55027.c scan-tree-dump-not optimized gimple_assign

=== gcc Summary ===

# of expected passes1
# of unexpected failures1
Executing on host: /Users/sabrinasouto/Downloads/gcc_trunk/objdir/gcc/xgcc -v  
 (timeout = 300)
spawn /Users/sabrinasouto/Downloads/gcc_trunk/objdir/gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=/Users/sabrinasouto/Downloads/gcc_trunk/objdir/gcc/xgcc
Target: x86_64-apple-darwin11.4.2
Configured with: ./../trunk/configure --prefix=/Users/sabrinasouto/trunk
--enable-languages=c,c++
Thread model: posix
gcc version 4.10.0 20140806 (experimental) (GCC) 


I also ran this test for other optimization levels (-O1, -O2, -O3) and GCC
produced the same failure.
Could someone please confirm if this is a bug?


Thanks,
Sabrina Souto.


[Bug tree-optimization/57732] [4.8/4.9/5 Regression] ICE (segfault in libisl) building drizzle on 32bit targets (at least arm-linux and i586-linux)

2014-08-15 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57732

Matthias Klose doko at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #5 from Matthias Klose doko at gcc dot gnu.org ---
can't see this anymore with the current 4.8 branch (and 4.9)


[Bug tree-optimization/59859] [meta-bug] GRAPHITE issues

2014-08-15 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59859
Bug 59859 depends on bug 57732, which changed state.

Bug 57732 Summary: [4.8/4.9/5 Regression] ICE (segfault in libisl) building 
drizzle on 32bit targets (at least arm-linux and i586-linux)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57732

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |WORKSFORME


[Bug libstdc++/62154] std::throw_with_nested should not require a polymorphic type

2014-08-15 Thread vlovich at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62154

Vitali vlovich at gmail dot com changed:

   What|Removed |Added

 CC||vlovich at gmail dot com

--- Comment #2 from Vitali vlovich at gmail dot com ---
Note that rethrow_if_nested suffers from the same problem.


[Bug fortran/44054] Handle -Werror, -Werror=, -fdiagnostics-show-option, !GCC$ diagnostic (pragmas) and color

2014-08-15 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44054

--- Comment #13 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
Author: manu
Date: Fri Aug 15 15:10:15 2014
New Revision: 214024

URL: https://gcc.gnu.org/viewcvs?rev=214024root=gccview=rev
Log:
2014-08-15  Manuel López-Ibáñez  m...@gcc.gnu.org

PR fortran/44054
gcc/
* diagnostic.c (build_message_string): Make it extern.
* diagnostic.h (build_message_string): Make it extern.
c-family/
* c-format.c: Handle Fortran flags.
fortran/
* gfortran.h: Define GCC_DIAG_STYLE.
(gfc_diagnostics_init,gfc_warning_cmdline): Declare.
* trans-array.c: Include gfortran.h before diagnostic-core.h.
* trans-expr.c: Likewise.
* trans-openmp.c: Likewise.
* trans-const.c: Likewise.
* trans.c: Likewise.
* trans-types.c: Likewise.
* f95-lang.c: Likewise.
* trans-decl.c: Likewise.
* trans-io.c: Likewise.
* trans-intrinsic.c: Likewise.
* error.c: Include diagnostic.h and diagnostic-color.h.
(gfc_diagnostic_build_prefix): New.
(gfc_diagnostic_starter): New.
(gfc_diagnostic_finalizer): New.
(gfc_warning_cmdline): New.
(gfc_diagnostics_init): New.
* gfc-diagnostic.def: New.
* options.c (gfc_init_options): Call gfc_diagnostics_init.
(gfc_post_options): Use gfc_warning_cmdline.

Added:
trunk/gcc/fortran/gfc-diagnostic.def
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-format.c
trunk/gcc/diagnostic.c
trunk/gcc/diagnostic.h
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/error.c
trunk/gcc/fortran/f95-lang.c
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/options.c
trunk/gcc/fortran/trans-array.c
trunk/gcc/fortran/trans-const.c
trunk/gcc/fortran/trans-decl.c
trunk/gcc/fortran/trans-expr.c
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/fortran/trans-io.c
trunk/gcc/fortran/trans-openmp.c
trunk/gcc/fortran/trans-types.c
trunk/gcc/fortran/trans.c

[Bug libstdc++/62154] std::throw_with_nested should not require a polymorphic type

2014-08-15 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62154

--- Comment #3 from Jonathan Wakely redi at gcc dot gnu.org ---
Author: redi
Date: Fri Aug 15 15:22:44 2014
New Revision: 214025

URL: https://gcc.gnu.org/viewcvs?rev=214025root=gccview=rev
Log:
PR libstdc++/62154
* libsupc++/nested_exception.h (throw_with_nested, rethrow_if_nested):
Rewrite to conform to C++11 requirements.
* testsuite/18_support/nested_exception/62154.cc: New.

Added:
trunk/libstdc++-v3/testsuite/18_support/nested_exception/62154.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/libsupc++/nested_exception.h


[Bug libstdc++/62159] New: Missing headers for freestanding implementation

2014-08-15 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62159

Bug ID: 62159
   Summary: Missing headers for freestanding implementation
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: redi at gcc dot gnu.org

Table 16 lists the headers required for a freestanding implementation, but we
are missing ciso646, cfloat, climits, cstdint, cstdalign, cstdbool,
type_traits and atomic


[Bug libstdc++/62154] std::throw_with_nested should not require a polymorphic type

2014-08-15 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62154

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #4 from Jonathan Wakely redi at gcc dot gnu.org ---
(In reply to Vitali from comment #2)
 Note that rethrow_if_nested suffers from the same problem.

Both are fixed now.


[Bug c++/62072] [5 regression] No SFINAE performed for function type

2014-08-15 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62072

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2014-08-15
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com
 Ever confirmed|0   |1

--- Comment #2 from Paolo Carlini paolo.carlini at oracle dot com ---
Unfortunately, it seems that more work is necessary in order to implement
correctly Core/1584. For the time being I'm reverting r212410, adding the
testcase here, closing this bug and reopening c++/57466.


[Bug rtl-optimization/62151] [5 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu

2014-08-15 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62151

--- Comment #6 from amker at gcc dot gnu.org ---
(In reply to Richard Biener from comment #5)
 Note that probably also made a latent issue pop up.

Indeed.  After preliminary investigation, I think this case reveals two latent
issues.  The first one is a missed optimization opportunity on GIMPLE, while
the second one is a wrong code issue in RTL combine.

I will firstly look into the combine issue and send a report later.

Thanks,
bin


[Bug libstdc++/62159] Missing headers for freestanding implementation

2014-08-15 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62159

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2014-08-15
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org ---
Created attachment 8
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=8action=edit
proposed patch


[Bug c++/57466] [DR 1584] Argument deduction fails for 'const T*' when T is function type

2014-08-15 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57466

--- Comment #6 from paolo at gcc dot gnu.org paolo at gcc dot gnu.org ---
Author: paolo
Date: Fri Aug 15 16:23:47 2014
New Revision: 214027

URL: https://gcc.gnu.org/viewcvs?rev=214027root=gccview=rev
Log:
/cp
2014-08-15  Paolo Carlini  paolo.carl...@oracle.com

PR c++/62072
Revert:
2014-07-09  Paolo Carlini  paolo.carl...@oracle.com

DR 1584
PR c++/57466
* pt.c (check_cv_quals_for_unify): Implement resolution, disregard
cv-qualifiers of function types.

/testsuite
2014-08-15  Paolo Carlini  paolo.carl...@oracle.com

PR c++/62072
Revert:
2014-07-09  Paolo Carlini  paolo.carl...@oracle.com

DR 1584
PR c++/57466
* g++.dg/template/pr57466.C: New.
* g++.dg/cpp0x/pr57466.C: Likewise.
* g++.dg/template/unify6.C: Update.

* g++.dg/cpp0x/sfinae52.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/sfinae52.C
Removed:
trunk/gcc/testsuite/g++.dg/cpp0x/pr57466.C
trunk/gcc/testsuite/g++.dg/template/pr57466.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/template/unify6.C


[Bug c++/62072] [5 regression] No SFINAE performed for function type

2014-08-15 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62072

--- Comment #3 from paolo at gcc dot gnu.org paolo at gcc dot gnu.org ---
Author: paolo
Date: Fri Aug 15 16:23:47 2014
New Revision: 214027

URL: https://gcc.gnu.org/viewcvs?rev=214027root=gccview=rev
Log:
/cp
2014-08-15  Paolo Carlini  paolo.carl...@oracle.com

PR c++/62072
Revert:
2014-07-09  Paolo Carlini  paolo.carl...@oracle.com

DR 1584
PR c++/57466
* pt.c (check_cv_quals_for_unify): Implement resolution, disregard
cv-qualifiers of function types.

/testsuite
2014-08-15  Paolo Carlini  paolo.carl...@oracle.com

PR c++/62072
Revert:
2014-07-09  Paolo Carlini  paolo.carl...@oracle.com

DR 1584
PR c++/57466
* g++.dg/template/pr57466.C: New.
* g++.dg/cpp0x/pr57466.C: Likewise.
* g++.dg/template/unify6.C: Update.

* g++.dg/cpp0x/sfinae52.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/sfinae52.C
Removed:
trunk/gcc/testsuite/g++.dg/cpp0x/pr57466.C
trunk/gcc/testsuite/g++.dg/template/pr57466.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/template/unify6.C


[Bug c++/62072] [5 regression] No SFINAE performed for function type

2014-08-15 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62072

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Assignee|paolo.carlini at oracle dot com|unassigned at gcc dot 
gnu.org

--- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com ---
Done.


[Bug libstdc++/57465] Failed postcondition for std::function constructed with null function pointer

2014-08-15 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57465
Bug 57465 depends on bug 57466, which changed state.

Bug 57466 Summary: [DR 1584] Argument deduction fails for 'const T*' when T is 
function type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57466

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---


[Bug c++/57466] [DR 1584] Argument deduction fails for 'const T*' when T is function type

2014-08-15 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57466

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #7 from Paolo Carlini paolo.carlini at oracle dot com ---
Patch reverted, unfortunately.


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

2014-08-15 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56997

--- Comment #17 from Bernd Edlinger bernd.edlinger at hotmail dot de ---
(In reply to Andrew Pinski from comment #16)
 This testcase fails on aarch64 when SLOW_UNALIGNED_ACCESS is true.

hmm, yes.

there are targets that define SLOW_UNALIGNED_ACCESS=1, but
they also define STRICT_ALIGNMENT=1 at the same time.
probably this combination is not tested at all.

does it pass if you use -mstrict-align ?


[Bug bootstrap/62077] --with-build-config=bootstrap-lto fails

2014-08-15 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62077

--- Comment #45 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Fri Aug 15 17:27:58 2014
New Revision: 214030

URL: https://gcc.gnu.org/viewcvs?rev=214030root=gccview=rev
Log:
PR bootstrap/62077
gcc/
* tree.c (type_hash_canon): Uncomment assert.
gcc/cp/
* tree.c (build_min_array_type, set_array_type_canon): Split out...
(build_cplus_array_type): ...from here.  Only call build_array_type
for main variants.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/tree.c
trunk/gcc/tree.c


[Bug tree-optimization/62071] [4.10 Regression] ICE: in before_dom_children, at tree-ssa-pre.c:4411

2014-08-15 Thread jason at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62071

--- Comment #7 from Jason Merrill jason at redhat dot com ---
On 08/14/2014 07:13 PM, Jan Hubicka wrote:
 On 08/14/2014 02:10 PM, Jan Hubicka wrote:
 I wonder what we should do with both external and comdat here.  Jason, can 
 we devirtualize?

 No, we're setting comdat now to avoid devirtualization, because we
 can't be confident that we'll be able to refer to the definition
 where it gets emitted.

 We had issues where function body was not produced because it is not reachable
 by the frontend's definition and it would be comdat otherwise. The case of
 inline function whose out of line body is keyed to another unit seems bit
 different...

It doesn't seem that different to me.  In both cases we don't have a 
local definition to refer to.

 The constructor is keyed to other compilation unit here, but we are 
 provided with a body
 that we will never use (modulo the tree-ssa-pre bug that brings the 
 reference into code).

 Hmm, we might consider overriding DECL_EXTERNAL so that there's a
 definition available for devirtualization.

 I can always implement logic to use it only when it is inlined, but that will 
 probably drag
 in references to other symbols belonging to the class...

I'm not too concerned about that; users should expect an inline function 
to be inlined.

Jason


[Bug bootstrap/62077] --with-build-config=bootstrap-lto fails

2014-08-15 Thread sven.c.dack at virginmedia dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62077

--- Comment #46 from Sven C. Dack sven.c.dack at virginmedia dot com ---
 ...
avg   stdev  %
default:282.86s0.56s, 0.20%100.00% (base)
profiled:   255.76s0.72s, 0.28%+10.60%
lto:282.80s0.16s, 0.06% +0.02%
lto-plugin: 285.41s0.49s, 0.17% -0.89%
 ...
 Not in my experience. As you've found out LTO is good for reducing 
 binary sizes, but it really needs PGO to make sensible decisions.

These are the new results (5 runs). I have dropped lto-plugin and added
profiled-lto:

  avg  stdev  %
default:  282.13s0.71, 0.25%100.00% (base)
profiled: 255.29s0.80, 0.31%+10.52%
lto:  281.71s0.70, 0.25% +0.15%
profiled-lto: 251.38s0.49, 0.19%+12.23%

gmp, mpfr and mpc have been compiled without LTO.

 BTW if you have TCMalloc installed on your machine, appending 
 POSTSTAGE1_LDFLAGS += -l/usr/lib/libtcmalloc.so.4 to
 config/bootstrap-lto.mk
 may give you an additional 8-10% speed boost (at least for big C++ projects,
 I haven't measured kernel build times).

This is going off the topic, but I do not mean to disrespect you. I did not use
it in the test runs. You may want to look at lockless malloc. It seems to be
all round better, because TCMalloc requires a very specific additional library
(libunwind-0.99-beta) and has got problems with glibc and locking, too.
lockless malloc is free of locking, very small, available as GPLv3 open
source and said be be faster than TCMalloc. See here:

http://locklessinc.com/benchmarks_allocator.shtml


[Bug bootstrap/62077] --with-build-config=bootstrap-lto fails

2014-08-15 Thread sven.c.dack at virginmedia dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62077

--- Comment #47 from Sven C. Dack sven.c.dack at virginmedia dot com ---
 default:84920k
 profiled:   90176k
 lto:71204k
 lto-plugin: 60024k

The new file sizes of cc1's are:

default:  84920k
profiled: 90176k
lto:  71204k
profiled-lto: 98556k


[Bug fortran/62142] [4.9/5 Regression] internal compiler error: Segmentation fault (X = X - L*floor(X/L))

2014-08-15 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62142

Thomas Koenig tkoenig at gcc dot gnu.org changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |tkoenig at gcc dot 
gnu.org

--- Comment #7 from Thomas Koenig tkoenig at gcc dot gnu.org ---
A rather obvious fix:

Index: trans-expr.c
===
--- trans-expr.c(Revision 213778)
+++ trans-expr.c(Arbeitskopie)
@@ -7895,7 +7895,7 @@
  for (a = expr2-value.function.actual; a != NULL; a = a-next)
{   
  e1 = a-expr; 
- if (e1-rank  0  !is_runtime_conformable (expr1, e1))
+ if (e1  e1-rank  0  !is_runtime_conformable (expr1, e1))
return false;
}
  return true;
@@ -7906,7 +7906,7 @@
  for (a = expr2-value.function.actual; a != NULL; a = a-next)
{
  e1 = a-expr;
- if (e1-rank  0  !is_runtime_conformable (expr1, e1))
+ if (e1  e1-rank  0  !is_runtime_conformable (expr1, e1))
return false;
}
  return true;


[Bug fortran/62106] [4.9/5 Regression] Adding a scalar variable to an array constructor gives wrong result

2014-08-15 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62106

--- Comment #5 from Thomas Koenig tkoenig at gcc dot gnu.org ---
Author: tkoenig
Date: Fri Aug 15 20:47:30 2014
New Revision: 214038

URL: https://gcc.gnu.org/viewcvs?rev=214038root=gccview=rev
Log:
2014-08-15  Thomas Koenig  tkoe...@gcc.gnu.org

Backport from trunk
PR fortran/62106
* gfortran.h (symbol_attribute):  Add fe_temp flag.
* frontend-passes.c (is_fe_temp):  New function.
(create_var):  Don't add a temporary for an already
created variable or for a constant.
(combine_ARRAY_constructor):  Remove special handling
for constants.

2014-08-15  Thomas Koenig  tkoe...@gcc.gnu.org

Backport from trunk
PR fortran/62106
* gfortran.dg/array_constructor_49.f90:  New test.


Added:
branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/array_constructor_49.f90
Modified:
branches/gcc-4_9-branch/gcc/fortran/ChangeLog
branches/gcc-4_9-branch/gcc/fortran/frontend-passes.c
branches/gcc-4_9-branch/gcc/fortran/gfortran.h
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


[Bug fortran/62106] [4.9/5 Regression] Adding a scalar variable to an array constructor gives wrong result

2014-08-15 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62106

Thomas Koenig tkoenig at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #6 from Thomas Koenig tkoenig at gcc dot gnu.org ---
Fixed on all affected branches, closing.


[Bug fortran/62142] [4.9/5 Regression] internal compiler error: Segmentation fault (X = X - L*floor(X/L))

2014-08-15 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62142

--- Comment #8 from Thomas Koenig tkoenig at gcc dot gnu.org ---
Author: tkoenig
Date: Fri Aug 15 21:19:33 2014
New Revision: 214043

URL: https://gcc.gnu.org/viewcvs?rev=214043root=gccview=rev
Log:
2014-08-15  Thomas Koenig  tkoe...@gcc.gnu.org

PR fortran/62142
* trans-expr.c (is_runtime_conformable):  Add NULL pointer checks.

2014-08-15  Thomas Koenig  tkoe...@gcc.gnu.org

PR fortran/62142
* gfortran.dg/realloc_on_assign_24.f90:  New test.


Added:
trunk/gcc/testsuite/gfortran.dg/realloc_on_assign_24.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog


[Bug tree-optimization/62071] [4.10 Regression] ICE: in before_dom_children, at tree-ssa-pre.c:4411

2014-08-15 Thread hubicka at ucw dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62071

--- Comment #8 from Jan Hubicka hubicka at ucw dot cz ---
 On 08/14/2014 07:13 PM, Jan Hubicka wrote:
 On 08/14/2014 02:10 PM, Jan Hubicka wrote:
 I wonder what we should do with both external and comdat here.  Jason, can 
 we devirtualize?
 
 No, we're setting comdat now to avoid devirtualization, because we
 can't be confident that we'll be able to refer to the definition
 where it gets emitted.
 
 We had issues where function body was not produced because it is not 
 reachable
 by the frontend's definition and it would be comdat otherwise. The case of
 inline function whose out of line body is keyed to another unit seems bit
 different...
 
 It doesn't seem that different to me.  In both cases we don't have a
 local definition to refer to.

I think the difference is that in one case we break ABI (by referring to the
symbol without providing a comdat body).

In the other case we just require user to link with classes he declares in
headers. So far I was always able to convince users to do the second.  We won't
devirtualize when explicit hidden attribute is present on the function body.
 
 The constructor is keyed to other compilation unit here, but we are 
 provided with a body
 that we will never use (modulo the tree-ssa-pre bug that brings the 
 reference into code).
 
 Hmm, we might consider overriding DECL_EXTERNAL so that there's a
 definition available for devirtualization.
 
 I can always implement logic to use it only when it is inlined, but that 
 will probably drag
 in references to other symbols belonging to the class...
 
 I'm not too concerned about that; users should expect an inline
 function to be inlined.

I guess I will need to add the necessary infrastructure then - so far we make
no difference
in between referring symbol and inlining body becuase before inlining we always
temporarily
produce the direct reference.

Honza


[Bug rtl-optimization/62004] dead type-unsafe load replaces type-safe load

2014-08-15 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62004

--- Comment #6 from vries at gcc dot gnu.org ---
Author: vries
Date: Fri Aug 15 21:23:21 2014
New Revision: 214044

URL: https://gcc.gnu.org/viewcvs?rev=214044root=gccview=rev
Log:
Fix if-conversion pass for dead type-unsafe code

2014-08-15  Tom de Vries  t...@codesourcery.com

Backport from mainline:
2014-08-14  Tom de Vries  t...@codesourcery.com

PR rtl-optimization/62004
PR rtl-optimization/62030
* ifcvt.c (rtx_interchangeable_p): New function.
(noce_try_move, noce_process_if_block): Use rtx_interchangeable_p.

* gcc.dg/pr62004.c: New test.
* gcc.dg/pr62030.c: Same.
* gcc.target/mips/pr62030-octeon.c: Same.

2014-08-05  Richard Biener  rguent...@suse.de

* emit-rtl.h (mem_attrs_eq_p): Declare.
* emit-rtl.c (mem_attrs_eq_p): Export.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr62004.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr62030.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/mips/pr62030-octeon.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/emit-rtl.c
branches/gcc-4_9-branch/gcc/emit-rtl.h
branches/gcc-4_9-branch/gcc/ifcvt.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


[Bug rtl-optimization/62030] wrong code due to ifcvt merging two stores which have different aliasing sets

2014-08-15 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62030

--- Comment #9 from vries at gcc dot gnu.org ---
Author: vries
Date: Fri Aug 15 21:23:21 2014
New Revision: 214044

URL: https://gcc.gnu.org/viewcvs?rev=214044root=gccview=rev
Log:
Fix if-conversion pass for dead type-unsafe code

2014-08-15  Tom de Vries  t...@codesourcery.com

Backport from mainline:
2014-08-14  Tom de Vries  t...@codesourcery.com

PR rtl-optimization/62004
PR rtl-optimization/62030
* ifcvt.c (rtx_interchangeable_p): New function.
(noce_try_move, noce_process_if_block): Use rtx_interchangeable_p.

* gcc.dg/pr62004.c: New test.
* gcc.dg/pr62030.c: Same.
* gcc.target/mips/pr62030-octeon.c: Same.

2014-08-05  Richard Biener  rguent...@suse.de

* emit-rtl.h (mem_attrs_eq_p): Declare.
* emit-rtl.c (mem_attrs_eq_p): Export.

Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr62004.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr62030.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/mips/pr62030-octeon.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/emit-rtl.c
branches/gcc-4_9-branch/gcc/emit-rtl.h
branches/gcc-4_9-branch/gcc/ifcvt.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog


[Bug c++/61566] [4.9/4.10 Regression] ICE in write_unscoped_name

2014-08-15 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61566

--- Comment #9 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Fri Aug 15 21:59:40 2014
New Revision: 214046

URL: https://gcc.gnu.org/viewcvs?rev=214046root=gccview=rev
Log:
PR c++/61566
* pt.c (instantiate_class_template_1): Ignore lambda on
CLASSTYPE_DECL_LIST.
(push_template_decl_real): A lambda is not primary.
(lookup_template_class_1): Don't look for a lambda partial
instantiation.
* lambda.c (maybe_add_lambda_conv_op): Distinguish between being
currently in a function and the lambda living in a function.
* mangle.c (CLASSTYPE_TEMPLATE_ID_P): False for lambda.

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


[Bug c++/61566] [4.9/4.10 Regression] ICE in write_unscoped_name

2014-08-15 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61566

--- Comment #10 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Fri Aug 15 22:27:06 2014
New Revision: 214049

URL: https://gcc.gnu.org/viewcvs?rev=214049root=gccview=rev
Log:
PR c++/61566
* pt.c (lookup_template_class_1): Revert recent change.
* mangle.c (CLASSTYPE_TEMPLATE_ID_P): Revert recent change.

Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/mangle.c
trunk/gcc/cp/pt.c


[Bug c++/62160] New: std::uppercase does not work for std::hex output

2014-08-15 Thread jj at chaosbits dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62160

Bug ID: 62160
   Summary: std::uppercase does not work for std::hex output
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jj at chaosbits dot net

Created attachment 9
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=9action=edit
pre-processed version of test.cc

Using std::uppercase should cause the use of uppercase characters in
hexadecimal integer output, but it does not seem to do so when that integer is
a pointer:

[jj@jj ~]$ g++ --version
g++ (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
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.

[jj@jj ~]$ cat test.cc 
#include iostream
int main() {
int* p = reinterpret_castint*(42);
int i = 42;
std::cout  std::hex  std::uppercase  p  std::endl;
std::cout  std::hex  std::uppercase  i  std::endl;
}
[jj@jj ~]$ g++ -std=c++11 test.cc 
[jj@jj ~]$ ./a.out 
0x2a
2A

As can be seen above, the output is clearly not uppercase in the pointer case
(although as far as I know; pointers are integers).

This looks like a bug to me, but maybe I'm just doing something exceptionally
stupid...


[Bug c++/62160] std::uppercase does not work for std::hex output

2014-08-15 Thread jj at chaosbits dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62160

Jesper Juhl jj at chaosbits dot net changed:

   What|Removed |Added

Version|unknown |4.8.2
   Severity|normal  |minor


[Bug c++/39159] unhelpful attribute warning on matching declaration after definition

2014-08-15 Thread jj at chaosbits dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39159

Jesper Juhl jj at chaosbits dot net changed:

   What|Removed |Added

 CC||jj at chaosbits dot net

--- Comment #2 from Jesper Juhl jj at chaosbits dot net ---
I've run into this as well with GCC 4.8.2 - it's rather annoying.


[Bug target/61641] [4.9/5 Regression] undefined label in jump_table_data

2014-08-15 Thread danglin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61641

--- Comment #9 from John David Anglin danglin at gcc dot gnu.org ---
With the patch from comment #8, I find the failure of delay-slot-2.c
was introduced in r209897:

2014-03-21  James Greenhalgh  james.greenha...@arm.com

* calls.c (initialize_argument_information): Always treat
PUSH_ARGS_REVERSED as 1, simplify code accordingly.
(expand_call): Likewise.
(emit_library_call_calue_1): Likewise.
* expr.c (PUSH_ARGS_REVERSED): Do not define.
(emit_push_insn): Always treat PUSH_ARGS_REVERSED as 1, simplify
code accordingly.


[Bug c++/39159] unhelpful attribute warning on matching declaration after definition

2014-08-15 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39159

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

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-08-16
 CC||manu at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #3 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
Confirmed.

Perhaps it is not hard to fix. Just look how it is handled for functions.
Probably it is at the same place as this:

  void __attribute__ ((visibility (default))) foo () { }
  void __attribute__ ((visibility (hidden))) foo ();

pr39159.C:4:49: warning: ‘void foo()’: visibility attribute ignored because it
conflicts with previous declaration [-Wattributes]
   void __attribute__ ((visibility (default))) foo () { }
 ^
pr39159.C:4:49: note: previous declaration of ‘void foo()’

and see if you can implement the same thing for types, probably at the point
where the  type attributes ignored warning is given.