[Bug middle-end/78901] [7 Regression] ICE: verify_gimple failed (error: statement marked for throw in middle of block)

2016-12-24 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78901

--- Comment #13 from Jakub Jelinek  ---
Author: jakub
Date: Sat Dec 24 11:15:44 2016
New Revision: 243914

URL: https://gcc.gnu.org/viewcvs?rev=243914&root=gcc&view=rev
Log:
PR middle-end/78901
* except.c (nothrow_libfn_p): Expect libc_name_p to return
const struct libc_name_struct *, if it returns NULL, return 0,
otherwise check c_ver and use flag_isoc99 or flag_isoc11.
* cfns.gperf: Add %struct-type and libc_name_struct definition.
For all C89 C library functions add , 89 after the name, add
C99 C library functions with , 99 and C11 C library functions
with , 11 suffix.
* cfns.h: Regenerated.

Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cfns.gperf
trunk/gcc/cp/cfns.h
trunk/gcc/cp/except.c

[Bug target/78921] New: SSE/AVX shuffle intrinsics uses builtins instead of __builtin_shuffle

2016-12-24 Thread linux at carewolf dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78921

Bug ID: 78921
   Summary: SSE/AVX shuffle intrinsics uses builtins instead of
__builtin_shuffle
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: linux at carewolf dot com
  Target Milestone: ---

The intrinsics for x86 SIMD shuffle instructions could be redeclared using
__builtin_shuffle. This would help folding and better instruction selection. 

This has already been suggested on
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29756 and is also a necessary
component of solving one part of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78563 .

[Bug c/78922] New: Comment submitted for translation in stringop.opt

2016-12-24 Thread fmarchal at perso dot be
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78922

Bug ID: 78922
   Summary: Comment submitted for translation in stringop.opt
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: fmarchal at perso dot be
  Target Milestone: ---

The generated gcc/po/gcc.pot file contains the three following messages:

#: config/i386/stringop.opt:8
msgid "the Free Software Foundation; either version 3, or (at your option)"
msgstr ""

#: config/i386/stringop.opt:13
msgid "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the"
msgstr ""

#: config/i386/stringop.opt:18
msgid "see .  */"
msgstr ""

These messages are coming from the copyright header in
gcc/config/i386/stringop.opt. They must not appear in gcc.pot as they do not
correspond to messages to be translated.

[Bug c++/78923] New: bad error message about missing template argument

2016-12-24 Thread drepper.fsp+rhbz at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78923

Bug ID: 78923
   Summary: bad error message about missing template argument
   Product: gcc
   Version: 6.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: drepper.fsp+rhbz at gmail dot com
  Target Milestone: ---

Here is another case where the error message emitted by gcc (albeit, 6.2.1, I
don't have a more recent version handy):

~
template
struct A;

template
struct B {
  B(A*);
};

template
B::B(A*) { // <-- should be:  B::B(A*) {
}
~

Notice the missing template argument.  The error message emitted is:
u.cc:10:8: error: expected constructor, destructor, or type conversion before
‘(’ token
 B::B(A*) {
^


In comparison, clang++ emits:

u.cc:10:9: error: use of class template 'A' requires template arguments
B::B(A*) {
^
u.cc:2:8: note: template is declared here
struct A;
   ^

[Bug c++/78924] New: hiding of template parameter of member template

2016-12-24 Thread litteras at ukr dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78924

Bug ID: 78924
   Summary: hiding of template parameter of member template
   Product: gcc
   Version: 5.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: litteras at ukr dot net
  Target Milestone: ---

due to http://eel.is/c++draft/temp.res#temp.local-7 :

"In the definition of a member of a class template that appears outside of the
class template definition, the name of a member of the class template hides the
name of a template-parameter of any enclosing class templates (but not a
template-parameter of the member if the member is a class or function
template). [ Example:

template struct A {
  struct B { /* ... */ };
  typedef void C;
  void f();
  template void g(U);
};

template void A::f() {
  B b;  // A's B, not the template parameter
}

template template void A::g(C) {
  B b;  // A's B, not the template parameter
  C c;  // the template parameter C, not A's C
}
— end example ]"

when i'm trying to compile the example, following errors occurs :

"template-bug-report.cxx:34:42: error: prototype for ‘void A::g()’ does not
match any in class ‘A’

template-bug-report.cxx:27:26: error: candidate is: template
template void A::g(U)"

(compiler treats C in A::g(C) as A's member name)

[Bug c++/78924] hiding of template parameter of member template

2016-12-24 Thread litteras at ukr dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78924

--- Comment #1 from litteras at ukr dot net ---
http://stackoverflow.com/questions/41313565/hiding-of-template-parameter-of-member-template

[Bug c++/78925] New: Inline friend template function not hidden during ADL

2016-12-24 Thread bluescarni at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78925

Bug ID: 78925
   Summary: Inline friend template function not hidden during ADL
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bluescarni at gmail dot com
  Target Milestone: ---

Consider the code:

--

namespace ns
{

template 
struct foo
{
template 
friend void bar(U) {}
};

}

int main()
{
ns::foo f_int;
bar(f_int);

ns::foo f_double;
bar(f_double);
}

--

Clang compiles this code without complaining, but every GCC version I have
tried (namely, 5.4.0 and the current trunk) fails, complaining about the
redefinition of ns::bar(). What seems to happen here is that during the lookup
for the second bar() call, the instantiation of bar() triggered by the first
call is considered via ADL, thus leading to two identical overloads being
present at the same time in the candidate set.

[Bug c++/78925] Inline friend template function not hidden during ADL

2016-12-24 Thread bluescarni at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78925

--- Comment #1 from Francesco Biscani  ---
Commenting either call to bar() leads to successful compilation.