Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
b269a014
Commit
b269a014
authored
Mar 10, 2020
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
c++: Add tests for PR93922 and PR94041.
parent
14af5d9b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
gcc/testsuite/g++.dg/cpp0x/initlist121.C
+31
-0
gcc/testsuite/g++.dg/cpp0x/initlist122.C
+16
-0
No files found.
gcc/testsuite/g++.dg/cpp0x/initlist121.C
0 → 100644
View file @
b269a014
// PR c++/93922
// { dg-do link { target c++11 } }
template
<
typename
T
>
struct
A
{
A
()
{}
template
<
typename
U
>
A
(
A
<
U
>
const
&
)
{}
~
A
()
{}
};
int
t
;
struct
B
{};
struct
C
:
B
{
C
(
B
const
&
)
{
if
(
t
)
throw
1
;
}
};
struct
S
{
A
<
B
const
>
x
;
C
y
;
};
A
<
B
>
bar
(
B
*
)
{
return
A
<
B
>
();
}
S
*
foo
(
B
*
x
,
B
const
&
y
)
{
return
new
S
{
bar
(
x
),
y
};
}
int
main
()
{
}
gcc/testsuite/g++.dg/cpp0x/initlist122.C
0 → 100644
View file @
b269a014
// PR c++/94041
// { dg-do run { target c++11 } }
bool
gone
;
struct
Temp
{
~
Temp
()
{
gone
=
true
;
}
};
struct
A
{
A
()
{};
A
(
const
Temp
&
)
noexcept
{};
};
struct
B
{
~
B
()
{};
};
struct
Pair
{
A
a
;
B
b
;
};
void
foo
(
const
Pair
&
)
noexcept
{
if
(
gone
)
__builtin_abort
();
}
int
main
()
{
foo
({
A
(
Temp
{}),
B
()});
if
(
!
gone
)
__builtin_abort
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment