[Bug c++/100507] New: ICE on invalid: tree check expects tree that contains 'decl common'

2021-05-10 Thread sand at rifkin dot dev via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100507

Bug ID: 100507
   Summary: ICE on invalid: tree check expects tree that contains
'decl common'
   Product: gcc
   Version: 10.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sand at rifkin dot dev
  Target Milestone: ---

template
void f(auto r){}

Causes an ICE on gcc trunk (11.1 errors correctly):
https://godbolt.org/z/fYe7E9ocM

[Bug c++/100482] namespaces as int in decltype expression

2021-05-07 Thread sand at rifkin dot dev via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100482

--- Comment #1 from Jeremy R.  ---
This appears to be valid for function return types as well but the compiler
does error when decltype is used in a function parameter

namespace std{}
int A(int a) { // fine
decltype(std) b = a;
return b;
}
decltype(std) B(int a) {  // fine
decltype(std) b = a;
return b;
}
auto C(int a) -> decltype(std) {  // fine
decltype(std) b = a;
return b;
}
int D(decltype(std) a) { // error: expected initializer before 'a'
decltype(std) b = a;
return b;
}

[Bug c++/100252] Internal compiler error during template instantiation

2021-04-25 Thread sand at rifkin dot dev via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100252

--- Comment #2 from Jeremy R.  ---
Even more minimal case: https://godbolt.org/z/M3Tv9oqcn

[Bug c++/100252] Internal compiler error during template instantiation

2021-04-25 Thread sand at rifkin dot dev via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100252

--- Comment #1 from Jeremy R.  ---
A more minimal case: https://godbolt.org/z/jxP9e35bz

[Bug c++/100252] New: Internal compiler error during template instantiation

2021-04-24 Thread sand at rifkin dot dev via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100252

Bug ID: 100252
   Summary: Internal compiler error during template instantiation
   Product: gcc
   Version: 10.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sand at rifkin dot dev
  Target Milestone: ---

An internal compiler error occurs while compiling this template code:
https://godbolt.org/z/rP9Wf97vP.

Error message:
: In member function 'typename example::Ac::gt::k& tcc::gr()
[with int I = 1; A = {float, int}]':
:97:62: internal compiler error: in replace_placeholders_r, at
cp/tree.c:3332
   97 | return typename example::Ac::template gt{k}.K;
  | ~^
0x1cff079 internal_error(char const*, ...)
???:0
0x6bac69 fancy_abort(char const*, int, char const*)
???:0
0x13971f3 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*))
???:0