Skip to content
Snippets Groups Projects
Commit 56dea94b authored by James A. Morrison's avatar James A. Morrison
Browse files

extrafunc.tree, [...]: New tests.

2005-02-26  James A. Morrison  <phython@gcc.gnu.org>

        * compile/extrafunc.tree, compile/extravar.tree: New tests.

From-SVN: r95581
parent 347561b8
No related branches found
No related tags found
No related merge requests found
2005-02-26 James A. Morrison <phython@gcc.gnu.org>
* compile/extrafunc.tree, compile/extravar.tree: New tests.
2005-02-26 James A. Morrison <phython@gcc.gnu.org> 2005-02-26 James A. Morrison <phython@gcc.gnu.org>
* compile/unsigned.tree: New test. * compile/unsigned.tree: New test.
......
// { dg-do compile }
// { dg-options "-O2 -fdump-tree-optimized -Wunused-function" }
// Check to see that unused functions get removed at -O2 and
// above.
static int foo (int bar);
static int baz (int aaa);
external_definition int ext (int bbb);
foo
{
return bar;
}
baz // { dg-warning "defined but not used" }
{
return foo (aaa);
}
ext
{
return foo (bbb);
}
// { dg-final { scan-tree-dump-not "baz" "optimized" } }
// { dg-do compile }
// { dg-options "-fdump-tree-vars -O1 -Wunused-variable" }
external_definition int bar (int aaa, int ddd);
static int foo = -3; // { dg-warning "defined but not used" }
bar
{
automatic int ccc;
return aaa + ddd + +3;
}
// { dg-final { scan-tree-dump-not "ccc" "vars" } }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment