[Bug go/60870] go interface methods broken on ppc64le (bug296.go)

2014-04-17 Thread anton at samba dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60870

--- Comment #1 from Anton Blanchard  ---
I just realised I gave a git commit id from the mirror. The ChangeLog entry is:

+2014-04-14  Chris Manghane  
+
+   * go-gcc.cc: Include "convert.h".
+   (Gcc_backend::string_constant_expression): New function.
+   (Gcc_backend::real_part_expression): Likewise.
+   (Gcc_backend::imag_part_expression): Likewise.
+   (Gcc_backend::complex_expression): Likewise.
+   (Gcc_backend::constructor_expression): Likewise.
+   (Gcc_backend::array_constructor_expression): Likewise.
+   (Gcc_backend::pointer_offset_expression): Likewise.
+   (Gcc_backend::array_index_expression): Likewise.
+   (Gcc_backend::call_expression): Likewise.
+   (Gcc_backend::exception_handler_statement): Likewise.
+   (Gcc_backend::function_defer_statement): Likewise.
+   (Gcc_backend::function_set_parameters): Likewise.
+   (Gcc_backend::function_set_body): Likewise.
+   (Gcc_backend::convert_expression): Handle various type
+   conversions.


[Bug ada/60864] Compilation Library GNATColl: gnatcoll-scripts.adb under Debian armhf

2014-04-17 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60864

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||ebotcazou at gcc dot gnu.org
 Resolution|--- |WONTFIX
   Severity|blocker |normal

--- Comment #1 from Eric Botcazou  ---
1. An ICE with optimization enabled can never be a blocker, since you just have
to remove the -Ox switch to unblock you.
2. GCC 4.6.x is not supported any more.


[Bug tree-optimization/60841] [4.9/4.10 Regression] gcc: internal compiler error: Killed (program cc1) out of memory

2014-04-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60841

--- Comment #14 from Richard Biener  ---
Author: rguenth
Date: Thu Apr 17 08:09:02 2014
New Revision: 209467

URL: http://gcc.gnu.org/viewcvs?rev=209467&root=gcc&view=rev
Log:
2014-04-17   Richard Biener  

PR tree-optimization/60841
* tree-vect-data-refs.c (vect_analyze_data_refs): Count stmts.
* tree-vect-loop.c (vect_analyze_loop_2): Pass down number
of stmts to SLP build.
* tree-vect-slp.c (vect_slp_analyze_bb_1): Likewise.
(vect_analyze_slp): Likewise.
(vect_analyze_slp_instance): Likewise.
(vect_build_slp_tree): Limit overall SLP tree growth.
* tree-vectorizer.h (vect_analyze_data_refs,
vect_analyze_slp): Adjust prototypes.

* gcc.dg/vect/pr60841.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/vect/pr60841.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-data-refs.c
trunk/gcc/tree-vect-loop.c
trunk/gcc/tree-vect-slp.c
trunk/gcc/tree-vectorizer.h


[Bug ipa/60854] [4.9 Regression] inline constructor of extern template

2014-04-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60854

Richard Biener  changed:

   What|Removed |Added

  Known to work||4.10.0
Summary|[4.9/4.10 Regression]   |[4.9 Regression] inline
   |inline constructor of   |constructor of extern
   |extern template |template
  Known to fail||4.9.0

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


[Bug tree-optimization/60841] [4.9 Regression] gcc: internal compiler error: Killed (program cc1) out of memory

2014-04-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60841

Richard Biener  changed:

   What|Removed |Added

  Known to work||4.10.0
Summary|[4.9/4.10 Regression] gcc:  |[4.9 Regression] gcc:
   |internal compiler error:|internal compiler error:
   |Killed (program cc1) out of |Killed (program cc1) out of
   |memory  |memory
  Known to fail|4.10.0  |

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


[Bug c++/60836] [4.7/4.8/4.9/4.10 Regression] invalid PHI argument and ICE in verify_gimple

2014-04-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60836

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Thu Apr 17 08:12:58 2014
New Revision: 209468

URL: http://gcc.gnu.org/viewcvs?rev=209468&root=gcc&view=rev
Log:
2014-04-17  Richard Biener  

PR tree-optimization/60836
* tree-vect-loop.c (vect_create_epilog_for_reduction): Force
initial PHI args to be gimple values.

* g++.dg/vect/pr60836.cc: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/vect/pr60836.cc
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-loop.c


[Bug tree-optimization/60849] [4.7/4.8/4.9/4.10 Regression] bogus comparison result type

2014-04-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60849

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Thu Apr 17 08:13:53 2014
New Revision: 209469

URL: http://gcc.gnu.org/viewcvs?rev=209469&root=gcc&view=rev
Log:
2014-04-17  Richard Biener  

PR middle-end/60849
* tree-ssa-propagate.c (valid_gimple_rhs_p): Only allow effective
boolean results for comparisons.

* g++.dg/opt/pr60849.C: New testcase.

Added:
trunk/gcc/testsuite/g++.dg/opt/pr60849.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-propagate.c


[Bug tree-optimization/60849] [4.7/4.8/4.9 Regression] bogus comparison result type

2014-04-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60849

Richard Biener  changed:

   What|Removed |Added

  Known to work||4.10.0
Summary|[4.7/4.8/4.9/4.10   |[4.7/4.8/4.9 Regression]
   |Regression] bogus   |bogus comparison result
   |comparison result type  |type
  Known to fail||4.9.0

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


[Bug c++/60836] [4.7/4.8/4.9 Regression] invalid PHI argument and ICE in verify_gimple

2014-04-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60836

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
  Known to work||4.10.0
Summary|[4.7/4.8/4.9/4.10   |[4.7/4.8/4.9 Regression]
   |Regression] invalid PHI |invalid PHI argument and
   |argument and ICE in |ICE in verify_gimple
   |verify_gimple   |

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


[Bug sanitizer/60861] out of bounds access of global var in .rodata/.bss not detected

2014-04-17 Thread kcc at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861

Kostya Serebryany  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #6 from Kostya Serebryany  ---
None of these is an asan bug, closing. 
Feel free to reopen if you disagree.


[Bug c++/58407] [C++11] Should warn about deprecated implicit generation of copy constructor/assignment

2014-04-17 Thread akrzemi1 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58407

--- Comment #7 from Andrzej Krzemienski  ---
Just one remark. A warning in this situation is not to just warn about any
deprecated feature, but to indicate something that is very likely to be a bug
(It used to be legal in C++03, so you couldn't legally warn about it; now the
deprecation is just an additional incentive). My guess is that having this copy
constructor implicitly defined when you have a custom destructor is a potential
bug in half of the cases. (Well, "half" is my guess.)


[Bug target/60868] [4.9/4.10 Regression] ICE: in int_mode_for_mode, at stor-layout.c:400 with -minline-all-stringops -minline-stringops-dynamically -march=core2

2014-04-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60868

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-04-17
 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |4.9.1
 Ever confirmed|0   |1

--- Comment #2 from Jakub Jelinek  ---
LGTM, but please once tested post a patch to gcc-patches including the
testcase.  And, for 4.9 it should go in after 4.9.0 is released.


[Bug ada/60411] Ada bootstrap failure on ARM

2014-04-17 Thread gnugcc at marino dot st
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60411

--- Comment #24 from John Marino  ---
(In reply to Eric Botcazou from comment #22)
> > Does this mean effectively nothing lower than ARMv7 can build
> > arm-*-linux-androideabi?
> 
> Apparently so, but it should be quite easy to fix this in
> sigtramp-armdroid.c by means of some preprocessor magic.

This statement is a little ambiguous to me, which is the current situation?

A) There are no plans to alter sigtramp-android.c to support ARM architectures
below ARMv7.  Patches would be accepted though.
B) There are no plans to alter sigtramp-android.c to support ARM architectures
below ARMv7.  Patches will not be accepted, so to support ARMv5 requires local
modification
C) We are planning to alter sigtramp-android.c to support earlier ARM
architectures, please be patient!

If scenario C, when / what version of GCC?

Thanks!


[Bug sanitizer/60861] out of bounds access of global var in .rodata/.bss not detected

2014-04-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861

--- Comment #7 from Jakub Jelinek  ---
I'd say it is fine for test to be optimized to 1 at -O2, but am not sure we
want to do that even for -O0 (and if we disable it for -O0, whether we want it
for -Og).  Then it will be user's choice whether he wants to instrument
optimized code (where there is no out of bound access), or non-optimized code
(where there would be out of bounds access).


[Bug target/60847] [4.9/4.10 Regression] x86 BMI intrinsics not recognized

2014-04-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60847

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Thu Apr 17 10:02:36 2014
New Revision: 209471

URL: http://gcc.gnu.org/viewcvs?rev=209471&root=gcc&view=rev
Log:
PR target/60847
Forward port from 4.8 branch
2013-07-19  Kirill Yukhin  

* config/i386/bmiintrin.h (_blsi_u32): New.
(_blsi_u64): Ditto.
(_blsr_u32): Ditto.
(_blsr_u64): Ditto.
(_blsmsk_u32): Ditto.
(_blsmsk_u64): Ditto.
(_tzcnt_u32): Ditto.
(_tzcnt_u64): Ditto.

* gcc.target/i386/bmi-1.c: Extend with new instrinsics.
Fix scan patterns.
* gcc.target/i386/bmi-2.c: Ditto.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/bmiintrin.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/bmi-1.c
trunk/gcc/testsuite/gcc.target/i386/bmi-2.c


[Bug target/60847] [4.9/4.10 Regression] x86 BMI intrinsics not recognized

2014-04-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60847

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Thu Apr 17 10:09:45 2014
New Revision: 209472

URL: http://gcc.gnu.org/viewcvs?rev=209472&root=gcc&view=rev
Log:
PR target/60847
Forward port from 4.8 branch
2013-07-19  Kirill Yukhin  

* config/i386/bmiintrin.h (_blsi_u32): New.
(_blsi_u64): Ditto.
(_blsr_u32): Ditto.
(_blsr_u64): Ditto.
(_blsmsk_u32): Ditto.
(_blsmsk_u64): Ditto.
(_tzcnt_u32): Ditto.
(_tzcnt_u64): Ditto.

* gcc.target/i386/bmi-1.c: Extend with new instrinsics.
Fix scan patterns.
* gcc.target/i386/bmi-2.c: Ditto.

Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/config/i386/bmiintrin.h
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/bmi-1.c
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/i386/bmi-2.c


[Bug target/60847] [4.9/4.10 Regression] x86 BMI intrinsics not recognized

2014-04-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60847

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #7 from Jakub Jelinek  ---
Should be fixed now.


[Bug go/60870] go interface methods broken on ppc64le (bug296.go)

2014-04-17 Thread uweigand at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60870

Ulrich Weigand  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-04-17
 CC||uweigand at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Ulrich Weigand  ---
Confirmed.

This commit seems to have reverted the effects of the bug fix here:
http://gcc.gnu.org/ml/gcc-patches/2013-11/msg02994.html


[Bug ada/60411] Ada bootstrap failure on ARM

2014-04-17 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60411

--- Comment #25 from Eric Botcazou  ---
> This statement is a little ambiguous to me, which is the current situation?
> 
> A) There are no plans to alter sigtramp-android.c to support ARM
> architectures below ARMv7.  Patches would be accepted though.
> B) There are no plans to alter sigtramp-android.c to support ARM
> architectures below ARMv7.  Patches will not be accepted, so to support
> ARMv5 requires local modification
> C) We are planning to alter sigtramp-android.c to support earlier ARM
> architectures, please be patient!

I guess the closest match is A.


[Bug tree-optimization/60871] New: internal compiler error: in possible_polymorphic_call_targets, at ipa-devirt.c:1510

2014-04-17 Thread holger.hopp at sap dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60871

Bug ID: 60871
   Summary: internal compiler error: in
possible_polymorphic_call_targets, at
ipa-devirt.c:1510
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: holger.hopp at sap dot com

Following code throws an internal compiler error with g++-4.9 -O2

$ g++ -O2 -c tst.c
tst.c: In static member function ‘static void C11::comp()’:
tst.c:88:1: internal compiler error: in possible_polymorphic_call_targets, at
ipa-devirt.c:1510
 }
 ^
0x9e77a8 possible_polymorphic_call_targets(tree_node*, long,
ipa_polymorphic_call_context, bool*, void**, int*)
../../gcc/ipa-devirt.c:1510
0x9a3b67 possible_polymorphic_call_targets(tree_node*, bool*, void**)
../../gcc/ipa-utils.h:142
0x9a0d56 gimple_fold_call
../../gcc/gimple-fold.c:1126
0x9a0d56 fold_stmt_1
../../gcc/gimple-fold.c:1239
0xbbc5b9 fold_marked_statements
../../gcc/tree-inline.c:4541
0xbc9b54 optimize_inline_calls(tree_node*)
../../gcc/tree-inline.c:4622
0x10639b9 early_inliner
../../gcc/ipa-inline.c:2303
0x10639b9 execute
../../gcc/ipa-inline.c:2366
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

Source:

void *vptr;

class C2
{
public:
  static inline C2 * cbss()
  {
singleton = (C2 *)vptr;
return singleton;
  }

private:
  static C2 * singleton;
};

class C3
{
public:
  C3(void) {}
  virtual void sf();
protected:
  unsigned m_local:1;
};

class C4 : virtual public C3
{
public:
 C4(void) : C3() {}
protected:
  void sf() { }
  void uf() { }
};

class C5
{
private:
  C3 * m_g;
public:
  C5(C3 * g) : m_g(g)  { m_g->sf(); }
};

class C6
{
public:
  virtual ~C6() {}
};

class C7 : public C6
{
protected:
  C7(void) {}
};

class C8 : public C4, public C7
{
public:
 C8(void) : C3(), C4(), C7() { }
};

class C9 : public C8
{
public:
 C9(void) : C3(), C8() { }
};

class C10 : public C9
{
protected:
 C10(void) : C3(), C9() { }
};

class C11 : public C10
{
protected:
 C11( const C2 * s ) : C3(), C10() { }

public:
  static void comp(void)
  {
C11 a(C2::cbss());
C5 uf(&a);
  }
};

void foo (void)
{
  C11::comp();
}

[Bug rtl-optimization/60866] [4.7/4.8/4.9/4.10 Regression] ICE: in get_seqno_for_a_jump, at sel-sched-ir.c:4068 with -fselective-scheduling -fno-if-conversion

2014-04-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60866

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-04-17
   Target Milestone|--- |4.7.4
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.


[Bug ipa/60865] ICE: verify_cgraph_node failed: comdat-local function called by outside its comdat

2014-04-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60865

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-04-17
 CC||hubicka at gcc dot gnu.org
  Component|middle-end  |ipa
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.  4.8 doesn't have -fdeclone-ctor-ctor.


[Bug ipa/60871] [4.9/4.10 Regression] internal compiler error: in possible_polymorphic_call_targets, at ipa-devirt.c:1510

2014-04-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60871

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
  Known to work||4.8.2
   Last reconfirmed||2014-04-17
  Component|tree-optimization   |ipa
 CC||hubicka at gcc dot gnu.org
 Ever confirmed|0   |1
Summary|internal compiler error: in |[4.9/4.10 Regression]
   |possible_polymorphic_call_t |internal compiler error: in
   |argets, at  |possible_polymorphic_call_t
   |ipa-devirt.c:1510   |argets, at
   ||ipa-devirt.c:1510
   Target Milestone|--- |4.9.1

--- Comment #1 from Richard Biener  ---
Confirmed.


[Bug ipa/60871] [4.9/4.10 Regression] internal compiler error: in possible_polymorphic_call_targets, at ipa-devirt.c:1510

2014-04-17 Thread trippels at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60871

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||trippels at gcc dot gnu.org

--- Comment #2 from Markus Trippelsdorf  ---
A bit further reduced:

class A
{
public:
  virtual void m_fn1 ();
  int m_local;
};
class C : virtual public A
{
};
class B
{
  A *m_g;

public:
  B (A *p1) : m_g (p1) { m_g->m_fn1 (); }
};
class C7
{
public:
  virtual ~C7 ();
};
class D : public C, C7
{
};
class F : D
{
  F (int);

public:
  static void m_fn2 ()
  {
F a (0);
B b (&a);
  }
};
void fn1 () { F::m_fn2 (); }


[Bug bootstrap/60644] [4.9/4.10 Regression] Build of i686-pc-linux-android is broken

2014-04-17 Thread kyukhin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60644

--- Comment #10 from Kirill Yukhin  ---
Author: kyukhin
Date: Thu Apr 17 11:52:44 2014
New Revision: 209474

URL: http://gcc.gnu.org/viewcvs?rev=209474&root=gcc&view=rev
Log:
libcilkrts/
PR other/60644
* runtime/os-unix.c: Replaced all occurrances of ANDROID with
__ANDROID__.
* runtime/bug.h: Likewise.
* include/cilk/metaprogramming.h: Likewise.
* include/cilk/reducer_min_max.h: Likewise.

Modified:
branches/gcc-4_9-branch/libcilkrts/ChangeLog
branches/gcc-4_9-branch/libcilkrts/include/cilk/metaprogramming.h
branches/gcc-4_9-branch/libcilkrts/include/cilk/reducer_min_max.h
branches/gcc-4_9-branch/libcilkrts/runtime/bug.h
branches/gcc-4_9-branch/libcilkrts/runtime/os-unix.c


[Bug c++/55189] enable -Wreturn-type by default

2014-04-17 Thread sylvestre at debian dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55189

--- Comment #8 from Sylvestre Ledru  ---
The patches to fix this bug are available here:
https://github.com/sylvestre/gcc
I am doing the legal FSF papers to be able to apply it.


[Bug ipa/60871] [4.9/4.10 Regression] internal compiler error: in possible_polymorphic_call_targets, at ipa-devirt.c:1510

2014-04-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60871

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
Started with r207451.  Tiny bit more reduced for -O2:
struct A
{
  virtual void m_fn1 ();
  int m_local;
};
class C : virtual public A
{
};
struct B
{
  A *m_g;

  B (A *p1) : m_g (p1) { m_g->m_fn1 (); }
};
struct C7
{
  virtual ~C7 ();
};
class D : public C, C7
{
};
struct F : D
{
  F (int);

  static void m_fn2 ()
  {
F a (0);
B b (&a);
  }
};
void fn1 () { F::m_fn2 (); }


[Bug c++/60872] New: Cannot memcpy array of restricted pointers

2014-04-17 Thread e.tadeu at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60872

Bug ID: 60872
   Summary: Cannot memcpy array of restricted pointers
   Product: gcc
   Version: 4.7.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: e.tadeu at gmail dot com

When trying to use memcpy to copy arrays of restricted pointers, it fails with
the message:


  error: '__restrict_' qualifiers cannot be applied to 'void'


This is a failing testcase:

#include 
#include 

typedef double* __restrict__ T;

void do_copy(T* a, const T* b)
{
memcpy(a, b, sizeof(T) * 3);
}

int main()
{
double x[3] = {1.5, 2.5, 3.5};

double *p0[3] = {&x[2], &x[1], &x[0]};
double *p1[3];

do_copy(p1, p0);

std::cout << *p1[2] << std::endl;

return 0;
}


[Bug sanitizer/56781] boostrap-asan failure: fixincl fails to link (missing -lasan)

2014-04-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56781

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Thu Apr 17 12:23:28 2014
New Revision: 209475

URL: http://gcc.gnu.org/viewcvs?rev=209475&root=gcc&view=rev
Log:
PR sanitizer/56781
* libtool-ldflags: Also prefix -static-lib*, -shared-lib*
and -B* options with -Xcompiler.
lto-plugin/
* Makefile.am (LTLDFLAGS, liblto_plugin_la_LINK): New variables.
* Makefile.in: Regenerated.

Modified:
trunk/ChangeLog
trunk/libtool-ldflags
trunk/lto-plugin/ChangeLog
trunk/lto-plugin/Makefile.am
trunk/lto-plugin/Makefile.in


[Bug sanitizer/56781] boostrap-asan failure: fixincl fails to link (missing -lasan)

2014-04-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56781

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Thu Apr 17 12:25:25 2014
New Revision: 209476

URL: http://gcc.gnu.org/viewcvs?rev=209476&root=gcc&view=rev
Log:
PR sanitizer/56781
lto-plugin/
* Makefile.am (CFLAGS, LDFLAGS): Filter out -fsanitize=address.
(liblto_plugin_la_LIBADD, liblto_plugin_la_LDFLAGS,
liblto_plugin_la_DEPENDENCIES): Prefer ../libiberty/noasan/libiberty.a
over ../libiberty/pic/libiberty.a if the former exists.
* Makefile.in: Regenerated.
libiberty/
* maint-tool: Also emit rule for noasan/ subdirectory.
* configure.ac (NOASANFLAG): Set and substitute.
* Makefile.in: Regenerated.
(NOASANFLAG): Set.
(all, $(TARGETLIB), mostlyclean): Handle noasan subdir like pic
subdir.
(stamp-noasandir): New goal.
* configure: Regenerated.

Modified:
trunk/libiberty/ChangeLog
trunk/libiberty/Makefile.in
trunk/libiberty/configure
trunk/libiberty/configure.ac
trunk/libiberty/maint-tool
trunk/lto-plugin/ChangeLog
trunk/lto-plugin/Makefile.am
trunk/lto-plugin/Makefile.in


[Bug c++/60872] Cannot memcpy array of restricted pointers

2014-04-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60872

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
Reduced testcase:
typedef double * __restrict__ T;

void bar (void *);

void
foo (T *a)
{
  bar (a);
}

Whether this is valid C++ or not will leave to our C++ folks.  Not a regression
of any kind, even g++ 3.2 fails the same way.
Note that in C, you get a warning for this and with explicit cast (bar ((void
*) a);) it is accepted without diagnostics.  In C++ it errors even for that,
and for the various C++ *_cast  (a).


[Bug c++/60873] New: C++11: template class with const member and default ctor should fail to compile?

2014-04-17 Thread sebastian.heg...@tu-dresden.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60873

Bug ID: 60873
   Summary: C++11: template class with const member and default
ctor should fail to compile?
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sebastian.heg...@tu-dresden.de

Consider this minimal example:

template 
struct A {
const T s_;
A() = default;
A(const T& s) : s_(s) {};
};


int main() {
A b(true);
};

Now, A has a default ctor which isn't used, but AFAIK simply defining it as
default violates the standard, so clearly, my code is buggy. 

I wonder, however, if gcc should reject the code, as ICC 2013 does:
error #409: "A::A() [with T=bool]" provides no initializer for:
const member "A::s_ [with T=bool]"
  A b(true);


Thanks!


[Bug c++/55189] enable -Wreturn-type by default

2014-04-17 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55189

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||manu at gcc dot gnu.org

--- Comment #9 from Manuel López-Ibáñez  ---
(In reply to Sylvestre Ledru from comment #8)
> The patches to fix this bug are available here:
> https://github.com/sylvestre/gcc
> I am doing the legal FSF papers to be able to apply it.

Cool! Hopefully it goes quickly. After that, I would suggest that you submit
the patch to gcc-patches and CC Jason Merrill and Dodji Seketeli, either of
them should be able to approve this.

I noticed that your patch does not update doc/invoke.texi to reflect the fact
that -Wreturn-type is enabled by default instead of by -Wall (it would be great
to automatically generate some parts of the manual from the options
description).

I also noticed that you did not include -Wmissing-return in your patch as
discussed here: http://gcc.gnu.org/ml/gcc/2013-11/msg00288.html

(Perhaps you did, and I am using github incorrectly?)

I think you will get easier approval if you include it (or send two patches in
the same email) and point out to the previous discussion (in particular Dodji,
Joseph and Jason's approval of this idea).

[Bug c++/55189] enable -Wreturn-type by default

2014-04-17 Thread sylvestre at debian dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55189

--- Comment #10 from Sylvestre Ledru  ---
(In reply to Manuel López-Ibáñez from comment #9)
> 
> Cool! Hopefully it goes quickly. After that, I would suggest that you submit
> the patch to gcc-patches and CC Jason Merrill and Dodji Seketeli, either of
> them should be able to approve this.
Sure. Thanks for the suggestion.

> I noticed that your patch does not update doc/invoke.texi to reflect the
> fact that -Wreturn-type is enabled by default instead of by -Wall (it would
> be great to automatically generate some parts of the manual from the options
> description).
I will have a look!

> I also noticed that you did not include -Wmissing-return in your patch as
> discussed here: http://gcc.gnu.org/ml/gcc/2013-11/msg00288.html
>  
> (Perhaps you did, and I am using github incorrectly?)
I did... removed it :)
I've followed Jason suggestion here:
http://gcc.gnu.org/ml/gcc-patches/2014-01/msg01033.html
The problem that we were trying to address with -Wmissing-return has been fixed
(AFAIK) by the commit description in comment #7

> I think you will get easier approval if you include it (or send two patches
> in the same email) and point out to the previous discussion (in particular
> Dodji, Joseph and Jason's approval of this idea).
Sure. Thanks for the advice.

[Bug rtl-optimization/60866] [4.7/4.8/4.9/4.10 Regression] ICE: in get_seqno_for_a_jump, at sel-sched-ir.c:4068 with -fselective-scheduling -fno-if-conversion

2014-04-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60866

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Started with r208165 on the trunk (which can of course mean it has been latent
before).


[Bug c++/60249] [c++11] Compiler goes into semi-infinite loop with wrong usage of user defined string literals

2014-04-17 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60249

Paolo Carlini  changed:

   What|Removed |Added

 CC||3dw4rd at verizon dot net

--- Comment #1 from Paolo Carlini  ---
Maybe Ed can have a look.


[Bug tree-optimization/60849] [4.7/4.8/4.9 Regression] bogus comparison result type

2014-04-17 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60849

--- Comment #7 from Richard Biener  ---
Author: rguenth
Date: Thu Apr 17 13:50:55 2014
New Revision: 209486

URL: http://gcc.gnu.org/viewcvs?rev=209486&root=gcc&view=rev
Log:
2014-04-17  Richard Biener  

PR middle-end/60849
* tree-ssa-propagate.c (valid_gimple_rhs_p): Allow vector
comparison results and add clarifying comment.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-propagate.c


[Bug c++/59118] internal compiler error: Segmentation fault - with "using" keyword and template parameter(s) (C++11)

2014-04-17 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59118

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #1 from Paolo Carlini  ---
This is fixed for 4.9.0.


[Bug c++/60873] C++11: template class with const member and default ctor should fail to compile?

2014-04-17 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60873

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #1 from Jonathan Wakely  ---
ICC is wrong to reject the code, the defaulted default constructor should be
defined as deleted according to [class.ctor]/5, so there should only be a
diagnostic if you try to use that default constructor.


[Bug libstdc++/60867] std::atomic> should fail to compile since unique_ptr is not trivial to copy

2014-04-17 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60867

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID
   Severity|normal  |enhancement

--- Comment #1 from Jonathan Wakely  ---
The standard does not require a diagnostic here, the error is in your code not
the library.

However, I put the following in std::atomic two days ago:

  // TODO: static_assert(is_trivially_copyable<_Tp>::value, "");

As soon as we have a working implementation of is_trivially_copyable that can
be enabled.


[Bug libstdc++/60867] std::atomic> should fail to compile since unique_ptr is not trivial to copy

2014-04-17 Thread kjell.hedstrom at logrhythm dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60867

--- Comment #2 from Kjell Hedstrom  ---
Sounds good. 

>> the error is in your code not the library

Yes. Code like that is obviously faulty. I am happy that you are considering
putting in a static_assert. From a coders perspective I find it very helpful if
the compiler would immediately find bugs of this nature. 

Cheers
Kjell


[Bug c++/60873] C++11: template class with const member and default ctor should fail to compile?

2014-04-17 Thread sebastian.heg...@tu-dresden.de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60873

--- Comment #2 from sebastian.heg...@tu-dresden.de ---
Thanks!


[Bug c++/59120] [c++11] ICE with invalid template alias

2014-04-17 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59120

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #1 from Paolo Carlini  ---
Mine.


[Bug tree-optimization/60823] [4.9/4.10 Regression] ICE in gimple_expand_cfg, at cfgexpand.c:5644

2014-04-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60823

Jakub Jelinek  changed:

   What|Removed |Added

  Attachment #32618|0   |1
is obsolete||

--- Comment #5 from Jakub Jelinek  ---
Created attachment 32624
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32624&action=edit
gcc49-pr60823.patch

Updated (still untested) patch.


[Bug fortran/42945] Gcov -a fails on Fortan generated object file (infinite loop?)

2014-04-17 Thread kargl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42945

--- Comment #7 from kargl at gcc dot gnu.org ---
(In reply to OTIS from comment #6)
> 
> gfortran-4.4.5
>

4.4.5 was released almost 4 years.  There have numerous
releases since 4.4.5 came out.  See comment #5.


[Bug target/60863] Incorrect codegen in ix86_expand_clear for -Os

2014-04-17 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60863

H.J. Lu  changed:

   What|Removed |Added

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

--- Comment #3 from H.J. Lu  ---
Fixed.


[Bug ipa/60871] [4.9/4.10 Regression] internal compiler error: in possible_polymorphic_call_targets, at ipa-devirt.c:1510

2014-04-17 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60871

Jan Hubicka  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #4 from Jan Hubicka  ---
Mine. Looking into it.


[Bug target/60735] GCC targeting E500 with SPE has errors with the _Decimal64 type

2014-04-17 Thread meissner at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60735

Michael Meissner  changed:

   What|Removed |Added

  Attachment #32520|0   |1
is obsolete||

--- Comment #10 from Michael Meissner  ---
Created attachment 32625
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32625&action=edit
Patch to fix problem (replacement for first patch)

This patch just fixes the specific problem on the SPE.


[Bug c++/58114] allow turning the warning about deleting a pointer of incomplete type into an error

2014-04-17 Thread fuscated at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58114

--- Comment #4 from Teodor Petrov  ---
@Jonathan Wakely: Do you think the ISO C++ standard people will be willing to
change this behaviour for a future standard? I'm asking in order to know if
there is any point in starting a conversation with them.


[Bug go/60870] go interface methods broken on ppc64le (bug296.go)

2014-04-17 Thread ian at airs dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60870

--- Comment #3 from Ian Lance Taylor  ---
Created attachment 32626
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32626&action=edit
possible patch


[Bug go/60870] go interface methods broken on ppc64le (bug296.go)

2014-04-17 Thread ian at airs dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60870

Ian Lance Taylor  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

--- Comment #4 from Ian Lance Taylor  ---
I don't have a PPC system.  Can you see if the attached patch to
gcc/go/gofrontend/expressions.cc fixes the problem?


[Bug c++/58114] allow turning the warning about deleting a pointer of incomplete type into an error

2014-04-17 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58114

--- Comment #5 from Jonathan Wakely  ---
That change would force compilers to reject currently valid programs that have
well-defined behaviour. Changes that like are not popular.

It is valid in C to pass a pointer to an incomplete type to free(), and this
C++ rule is compatible. You can delete incomplete types if they have trivial
destructors (like C structs).


[Bug c++/10112] static data member is not correctly initialised

2014-04-17 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10112

Jonathan Wakely  changed:

   What|Removed |Added

 Status|SUSPENDED   |RESOLVED
 Resolution|--- |INVALID

--- Comment #19 from Jonathan Wakely  ---
http://open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#993 clarifies that the
compiler can instantiate templates at the end of the file, so you need to use
explicit instantiations to control order of initialization.


[Bug go/60874] New: FAIL: go.test/test/recover.go execution

2014-04-17 Thread ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60874

Bug ID: 60874
   Summary: FAIL: go.test/test/recover.go execution
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: go
  Assignee: ian at airs dot com
  Reporter: ubizjak at gmail dot com

The test fails [1] on alpha-linux-gnu (and other non-x86 processors) because
reflect.MakeFunc and other functions from reflect/makefunc.go are not
implemented for non-x86 architecture.

There was a suggestion to use libffi closures for this functionality [2], which
could solve this problem in a generic way.

[1] http://gcc.gnu.org/ml/gcc-testresults/2014-03/msg00790.html
[1] http://gcc.gnu.org/ml/gcc-patches/2013-09/msg02048.html


[Bug c/60439] No warning for case overflow in switch statement.

2014-04-17 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #7 from Marek Polacek  ---
I'm testing a patch for "switch condition has boolean value" warning.


[Bug go/60870] go interface methods broken on ppc64le (bug296.go)

2014-04-17 Thread uweigand at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60870

--- Comment #5 from Ulrich Weigand  ---
(In reply to Ian Lance Taylor from comment #4)
> I don't have a PPC system.  Can you see if the attached patch to
> gcc/go/gofrontend/expressions.cc fixes the problem?

Yes, this makes bug296.go PASS again on powerpc64le.

Thanks for the quick fix!


[Bug go/60870] go interface methods broken on ppc64le (bug296.go)

2014-04-17 Thread ian at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60870

--- Comment #6 from ian at gcc dot gnu.org  ---
Author: ian
Date: Thu Apr 17 19:27:22 2014
New Revision: 209494

URL: http://gcc.gnu.org/viewcvs?rev=209494&root=gcc&view=rev
Log:
PR go/60870

compiler: Don't convert function type for an interface method.

For an interface method the function type is the type without
the receiver, which is wrong since we are passing a receiver.
The interface method will always have the correct type in this
case, so no type conversion is necessary.

Also don't do the type conversion when calling a named
function, since in that case the type is also always correct.

The type can be wrong, and the conversion required, when the
function type refers to itself recursively.

Modified:
trunk/gcc/go/gofrontend/expressions.cc


[Bug go/60870] go interface methods broken on ppc64le (bug296.go)

2014-04-17 Thread ian at airs dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60870

Ian Lance Taylor  changed:

   What|Removed |Added

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

--- Comment #7 from Ian Lance Taylor  ---
Fixed.


[Bug c++/59200] ICE with invalid alias template use

2014-04-17 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59200

--- Comment #1 from Paolo Carlini  ---
This is fixed for 4.9.0. I'm adding the testcase and closing the bug.


[Bug preprocessor/60875] New: `_Pragma("message \"foo\")"` doesn't work in expression contexts.

2014-04-17 Thread thakis at chromium dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60875

Bug ID: 60875
   Summary: `_Pragma("message \"foo\")"` doesn't work in
expression contexts.
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: preprocessor
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thakis at chromium dot org

Actual:

$ cat test.cc
int main() {
  return _Pragma("message \"hello\"") 1234;
}
$ ~/gcc482prefix/bin/gcc -c test.cc  -Wall
test.cc: In function ‘int main()’:
test.cc:2:1: error: ‘#pragma’ is not allowed here
   return _Pragma("message \"my warning\"") 1234;
 ^
test.cc:2:44: error: expected ‘;’ before numeric constant
   return _Pragma("message \"my warning\"") 1234;
^
test.cc:2:49: warning: statement has no effect [-Wunused-value]
   return _Pragma("message \"my warning\"") 1234;
^

Expected (which is what clang does, and what MSVS does with `
__pragma(message...`):

Display the message instead.

(clang's output:

$ ../../../chrome/src/third_party/llvm-build/Release+Asserts/
bin/clang -c test.cc -Wall
test.cc:2:10: warning: my warning [-W#pragma-messages]
  return _Pragma("message \"my warning\"") 1234;
 ^
:2:2: note: expanded from here
 message "my warning"
 ^
1 warning generated.
)


A silly workaround is to use _Pragma("message_workaround...), then gcc will
warn  like so:

test.cc:2:10: warning: unknown pragma ignored [-Wunknown-pragmas]
  return _Pragma("message_workaround \"my warning\"") 1234;
 ^


It'd be nice if _Pragma(message...) could be used directly, instead of having
to rely on -Wunknown-pragmas for this functionality.



(The usecase we have for this in Chromium is that we want to make the compiler
print a diagnostic every time some symbols are used, so we define the symbols
as

  #define MY_SYMBOL _Pragma("message \"foo\"") SYMBOL

This works fine in clang and MSVC, but for gcc we have to use a dummy pragma
and rely on -Wunknown-pragmas.)

[Bug preprocessor/60875] `_Pragma("message \"foo\")"` doesn't work in expression contexts.

2014-04-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60875

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
Use deprecated attribute instead?


[Bug preprocessor/60875] `_Pragma("message \"foo\")"` doesn't work in expression contexts.

2014-04-17 Thread thakis at chromium dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60875

--- Comment #2 from thakis at chromium dot org ---
That only works on declarations, not in an expression, right?

(We do have a workaround that works with gcc. But "pragma message" matches the
semantics of what we want to do, and it works with MSVC and clang, so it'd be
nice if it worked in gcc too.)


[Bug rtl-optimization/60876] New: 2014-04-17 change to mqchmode.h breaks PowerPC

2014-04-17 Thread meissner at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60876

Bug ID: 60876
   Summary: 2014-04-17 change to mqchmode.h breaks PowerPC
   Product: gcc
   Version: 4.9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: meissner at gcc dot gnu.org

The change on 2014-04-17 to machmode.h had a side effect of breaking the
PowerPC builds, due to the fact that the PowerPC code in rs6000.c used integers
in two places where GET_MODE_SIZE was used, and this now causes the following
error:

/home/meissner/fsf-src/trunk/gcc/config/rs6000/rs6000.c: In function ‘void
rs6000_setup_reg_addr_masks()’:
/home/meissner/fsf-src/trunk/gcc/config/rs6000/rs6000.c:2366: error: invalid
conversion from ‘ssize_t’ to ‘machine_mode’
/home/meissner/fsf-src/trunk/gcc/config/rs6000/rs6000.c:2370: error: invalid
conversion from ‘ssize_t’ to ‘machine_mode’
/home/meissner/fsf-src/trunk/gcc/config/rs6000/rs6000.c: In function ‘void
rs6000_init_hard_regno_mode_ok(bool)’:
/home/meissner/fsf-src/trunk/gcc/config/rs6000/rs6000.c:2826: error: invalid
conversion from ‘ssize_t’ to ‘machine_mode’

[Bug rtl-optimization/60876] 2014-04-17 change to mqchmode.h breaks PowerPC

2014-04-17 Thread meissner at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60876

Michael Meissner  changed:

   What|Removed |Added

   Priority|P3  |P1
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2014-04-17
 CC||dje at gcc dot gnu.org,
   ||jakub at redhat dot com
   Assignee|unassigned at gcc dot gnu.org  |meissner at gcc dot 
gnu.org
 Ever confirmed|0   |1


[Bug target/60876] 2014-04-17 change to mqchmode.h breaks PowerPC

2014-04-17 Thread meissner at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60876

--- Comment #1 from Michael Meissner  ---
Created attachment 32627
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32627&action=edit
Proposed patch to fix the problem

I'm testing the patch right now.


[Bug c/60877] New: __attribute__optimize("O0") conflict with static function at -O1

2014-04-17 Thread mnp at agtmt dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60877

Bug ID: 60877
   Summary: __attribute__optimize("O0") conflict with static
function at -O1
   Product: gcc
   Version: 4.7.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mnp at agtmt dot com

Created attachment 32628
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32628&action=edit
preprocessed .i file

#include 

static int sub1(int i, int j)
{
return j;
}

void __attribute__((optimize("O0"))) main(void)
{
int k;
k = sub1(0, 1);
printf("%d\n",k);
}

gcc -O1

if sub1() is static, return is wrong  
   movl%edx, %eax
   ret 

if not static, return is correct
movl8(%esp), %eax
ret

gcc version 4.7.2 20130108 [gcc-4_7-branch revision 195012] (SUSE Linux)


[Bug target/60876] 2014-04-17 change to machmode.h breaks PowerPC

2014-04-17 Thread meissner at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60876

--- Comment #2 from Michael Meissner  ---
Author: meissner
Date: Thu Apr 17 21:50:58 2014
New Revision: 209498

URL: http://gcc.gnu.org/viewcvs?rev=209498&root=gcc&view=rev
Log:
2014-04-17  Michael Meissner  

PR target/60876
* config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Make sure
GET_MODE_SIZE gets passed an enum machine_mode type and not
integer.
(rs6000_init_hard_regno_mode_ok): Likewise.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.c


[Bug target/60876] 2014-04-17 change to machmode.h breaks PowerPC

2014-04-17 Thread meissner at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60876

Michael Meissner  changed:

   What|Removed |Added

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

--- Comment #3 from Michael Meissner  ---
Fixed in subversion id 209498.


[Bug target/60877] __attribute__optimize("O0") conflict with static function at -O1

2014-04-17 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60877

Andrew Pinski  changed:

   What|Removed |Added

 Target||x86_64-*-*-*
  Component|c   |target

--- Comment #1 from Andrew Pinski  ---
This is a target specific issue where the target is changing the ABI but not
changing the ABI for the callee function.


[Bug c++/59200] ICE with invalid alias template use

2014-04-17 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59200

--- Comment #2 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Thu Apr 17 21:56:46 2014
New Revision: 209499

URL: http://gcc.gnu.org/viewcvs?rev=209499&root=gcc&view=rev
Log:
2014-04-17  Paolo Carlini  

PR c++/59200
* g++.dg/cpp0x/alias-decl-42.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/alias-decl-42.C
Modified:
trunk/gcc/testsuite/ChangeLog


[Bug c++/59200] ICE with invalid alias template use

2014-04-17 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59200

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #3 from Paolo Carlini  ---
Done.


[Bug c++/60878] New: Explicit Specialization of Inner Template Class In A Template Class, Using an Enum in Parent Template Class as Template Argument

2014-04-17 Thread fasdfasdas at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60878

Bug ID: 60878
   Summary: Explicit Specialization of Inner Template Class In A
Template Class, Using an Enum in Parent Template Class
as Template Argument
   Product: gcc
   Version: 4.8.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: fasdfasdas at gmail dot com

The following code compiles in clang++ 3.5 (as of yesterday's unstable branch)
and g++ 4.6.3. It does not compile with clang++ 2.9. It also compiles on "GNU
C++ (GCC) version 4.8.2 20140206 (prerelease) (x86_64-unknown-linux-gnu)" but
not "GNU C++ (Arch Repository) version 4.8.2 (arm-none-eabi)".

The compilers that do not compile the code gives an error saying:

test.cpp: In function 'int main()':
test.cpp:60:7: error: 'class Port<0u>::Pin<5u, (Port<0u>::PinMode)1>' has no
member named 'set'
   pin.set();
   ^

Apparently, they do choose the class template, not the specialization.

Code to reproduce:

#include 

template
class Port
{
public: //Declarations
  enum class PinMode
  {
Input = 0x0,
Output = 0x1,
Alternate = 0x2,
Analog = 0x3
  };

  template
  class Pin
  {

  };

  template
  class Pin
  {
  public: //Declarations
enum class OutputSpeed : uint32_t
{
  Low,
  Medium,
  Fast,
  High
};

enum class PullMode : uint32_t
{
  None = 0x0,
  PullUp = 0x1,
  PullDown = 0x2
};

  public: //Methods
void setOutputSpeed(OutputSpeed const ospeed) volatile;
void setPullMode(PullMode const ppm) volatile;

void set() volatile
{
  reinterpret_cast volatile*>(port)->m_BSRR |=
static_cast(0x1) <::Pin<5, Port<0>::PinMode::Output>();
  pin.set();
}


[Bug c++/60878] Explicit Specialization of Inner Template Class In A Template Class, Using an Enum in Parent Template Class as Template Argument

2014-04-17 Thread fasdfasdas at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60878

Tolga  changed:

   What|Removed |Added

   Severity|normal  |blocker


[Bug c++/60878] Explicit Specialization of Inner Template Class In A Template Class, Using an Enum class in Parent Template Class as Template Argument

2014-04-17 Thread pinskia at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60878

Andrew Pinski  changed:

   What|Removed |Added

Summary|Explicit Specialization of  |Explicit Specialization of
   |Inner Template Class In A   |Inner Template Class In A
   |Template Class, Using an|Template Class, Using an
   |Enum in Parent Template |Enum class in Parent
   |Class as Template Argument  |Template Class as Template
   ||Argument
   Severity|blocker |normal


[Bug tree-optimization/60849] [4.7/4.8/4.9 Regression] bogus comparison result type

2014-04-17 Thread dehao at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60849

--- Comment #8 from dehao at gcc dot gnu.org ---
Richard,

Thanks for the quick fix. Are both patches needed? Could you backport your
patches to gcc-4_9 branch?

Thanks,
Dehao


[Bug c++/60878] Explicit Specialization of Inner Template Class In A Template Class, Using an Enum class in Parent Template Class as Template Argument

2014-04-17 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60878

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||4.10.0, 4.7.3, 4.9.0

--- Comment #1 from Jonathan Wakely  ---
Already fixed in the 4.9 branch and trunk


[Bug target/60879] New: Wrong decision in decide_alg

2014-04-17 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60879

Bug ID: 60879
   Summary: Wrong decision in decide_alg
   Product: gcc
   Version: 4.10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
CC: ubizjak at gmail dot com

decide_alg has

  /* Very tiny blocks are best handled via the loop, REP is expensive to
 setup.  */
  else if (expected_size != -1 && expected_size < 4)
return loop_1_byte;

We use 1-byte loop on fixed size 1, 2 and 3.  We should simply unroll
loop.


[Bug target/60880] New: Wrong assert in promote_duplicated_reg

2014-04-17 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60880

Bug ID: 60880
   Summary: Wrong assert in promote_duplicated_reg
   Product: gcc
   Version: 4.10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com

promote_duplicated_reg has

gcc_assert (mode == SImode || mode == DImode || val == const0_rtx);

But it may be called by promote_duplicated_reg_to_size with HImode:

  else if (size_needed > 1 || (desired_align > align && desired_align > 1))
promoted_val = promote_duplicated_reg (HImode, val);