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
79efe0b3
Commit
79efe0b3
authored
Sep 30, 2009
by
Jason Merrill
Committed by
Jason Merrill
Sep 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* g++.dg/eh/init-temp1.C: Improve test.
From-SVN: r152341
parent
c28a9eac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/g++.dg/eh/init-temp1.C
+18
-8
No files found.
gcc/testsuite/ChangeLog
View file @
79efe0b3
2009-09-30 Jason Merrill <jason@redhat.com>
* g++.dg/eh/init-temp1.C: Improve test.
2009-09-30 Uros Bizjak <ubizjak@gmail.com>
2009-09-30 Uros Bizjak <ubizjak@gmail.com>
PR target/22093
PR target/22093
...
...
gcc/testsuite/g++.dg/eh/init-temp1.C
View file @
79efe0b3
// PR c++/15764
// PR c++/15764
// { dg-do run }
extern
"C"
void
abort
();
extern
"C"
void
abort
();
int
counter
=
0
;
int
thrown
;
int
thrown
;
struct
a
{
~
a
()
{
if
(
thrown
++
==
0
)
throw
42
;
}
int
as
;
struct
a
{
a
()
{
++
as
;
}
~
a
()
{
--
as
;
if
(
thrown
++
==
0
)
throw
42
;
}
};
};
int
f
(
a
const
&
)
{
return
1
;
}
int
f
(
a
const
&
)
{
return
1
;
}
int
f
(
a
const
&
,
a
const
&
)
{
return
1
;
}
int
f
(
a
const
&
,
a
const
&
)
{
return
1
;
}
int
bs
;
int
as_sav
;
struct
b
{
struct
b
{
b
(...)
{
++
counter
;
}
b
(...)
{
++
bs
;
}
~
b
()
{
--
counter
;
}
~
b
()
{
--
bs
;
as_sav
=
as
;
}
};
};
bool
p
;
bool
p
;
...
@@ -29,7 +34,12 @@ int main () {
...
@@ -29,7 +34,12 @@ int main () {
g
();
g
();
}
}
catch
(...)
{}
catch
(...)
{}
// We throw when the first a is destroyed, which should destroy b before
// the other a.
if
(
as_sav
!=
1
)
abort
();
thrown
=
0
;
thrown
=
0
;
try
{
try
{
...
@@ -39,6 +49,6 @@ int main () {
...
@@ -39,6 +49,6 @@ int main () {
}
}
catch
(...)
{}
catch
(...)
{}
if
(
counter
!=
0
)
if
(
bs
!=
0
)
abort
();
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