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
0adad9c5
Commit
0adad9c5
authored
Sep 01, 2013
by
Jan Hubicka
Committed by
Jan Hubicka
Sep 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* g++.dg/ipa/devirt-15.C: New testcase.
From-SVN: r202153
parent
d775b5ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/g++.dg/ipa/devirt-15.C
+40
-0
No files found.
gcc/testsuite/ChangeLog
View file @
0adad9c5
2013-09-01 Jan Hubicka <jh@suse.cz>
* g++.dg/ipa/devirt-15.C: New testcase.
2013-09-01 Eric Botcazou <ebotcazou@adacore.com>
2013-09-01 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/specs/linker_alias.ads: Skip on Darwin.
* gnat.dg/specs/linker_alias.ads: Skip on Darwin.
...
...
gcc/testsuite/g++.dg/ipa/devirt-15.C
0 → 100644
View file @
0adad9c5
/* Check that we speculatively devirutalize call to FOO to B::foo becuase
A is noreturn. */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-devirt" } */
class
A
{
public
:
virtual
int
foo
(
void
)
{
throw
(
1
);
return
0
;
}
};
class
B
:
public
A
{
public
:
virtual
int
foo
(
void
);
};
int
B
::
foo
(
void
)
{
return
1
;
}
class
A
a
,
*
b
=&
a
;
void
m
(
void
)
{
b
->
foo
();
}
main
()
{
m
();
}
/* { dg-final { scan-ipa-dump "Speculatively devirtualizing call" "devirt"} } */
/* { dg-final { cleanup-ipa-dump "devirt" } } */
/* Match if (PROF_6 == foo) to verify that the speculation survived. */
/* { dg-final { scan-tree-dump "== foo" "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
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