re PR c++/57416 (internal compiler error: in gimple_expand_cfg, at cfgexpand.c:4575)
2013-08-12 Paolo Carlini <paolo.carlini@oracle.com> PR c++/57416 * g++.dg/cpp0x/pr57416.C: New. From-SVN: r201672
This commit is contained in:
parent
2e507b9a99
commit
97524ab728
2 changed files with 50 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-08-12 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/57416
|
||||
* g++.dg/cpp0x/pr57416.C: New.
|
||||
|
||||
2013-08-12 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
* g++.dg/cpp0x/constexpr-function2.C: Adjust for error -> inform
|
||||
|
|
45
gcc/testsuite/g++.dg/cpp0x/pr57416.C
Normal file
45
gcc/testsuite/g++.dg/cpp0x/pr57416.C
Normal file
|
@ -0,0 +1,45 @@
|
|||
// PR c++/57416
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
struct Nothing
|
||||
{
|
||||
};
|
||||
|
||||
template <class PARENTDATA>
|
||||
void func3 (PARENTDATA & p_parent_data)
|
||||
{
|
||||
struct Data
|
||||
{
|
||||
PARENTDATA & parent_data = p_parent_data; // { dg-error "parameter" }
|
||||
} data;
|
||||
}
|
||||
|
||||
template <class PARENTDATA>
|
||||
void func2 (PARENTDATA & p_parent_data)
|
||||
{
|
||||
struct Data
|
||||
{
|
||||
PARENTDATA & parent_data = p_parent_data; // { dg-error "parameter" }
|
||||
} data;
|
||||
|
||||
data.parent_data.x = 5;
|
||||
func3(data);
|
||||
}
|
||||
|
||||
template <class PARENTDATA>
|
||||
void func1 (PARENTDATA & p_parent_data)
|
||||
{
|
||||
struct Data
|
||||
{
|
||||
PARENTDATA & parent_data = p_parent_data; // { dg-error "parameter" }
|
||||
int x = 1;
|
||||
} data;
|
||||
|
||||
func2(data);
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
Nothing nothing;
|
||||
func1(nothing);
|
||||
}
|
Loading…
Add table
Reference in a new issue