Commit c19787df by Paolo Bonzini Committed by Paolo Bonzini

inline-1.C: New.

2010-01-30  Paolo Bonzini  <bonzini@gnu.org>

	* g++.dg/tree-ssa/inline-1.C: New.
	* g++.dg/tree-ssa/inline-2.C: New.
	* g++.dg/tree-ssa/inline-3.C: New.

From-SVN: r156384
parent 7adb8e00
2010-01-30 Paolo Bonzini <bonzini@gnu.org>
* g++.dg/tree-ssa/inline-1.C: New.
* g++.dg/tree-ssa/inline-2.C: New.
* g++.dg/tree-ssa/inline-3.C: New.
2010-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
PR testsuite/41701
......
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-einline2" } */
/* { dg-add-options bind_pic_locally } */
namespace std {
extern "C" void puts(const char *s);
}
template <class T, class E> void
foreach (T b, T e, void (*ptr)(E))
{
for (; b != e; b++)
ptr(*b);
}
void
inline_me (char *x)
{
std::puts(x);
}
static void
inline_me_too (char *x)
{
std::puts(x);
}
int main(int argc, char **argv)
{
foreach (argv, argv + argc, inline_me);
foreach (argv, argv + argc, inline_me_too);
}
/* { dg-final { scan-tree-dump-times "Inlining void inline_me\\(" 1 "einline2"} } */
/* { dg-final { scan-tree-dump-times "Inlining void inline_me_too\\(" 1 "einline2"} } */
/* { dg-final { cleanup-tree-dump "einline2" } } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-einline2" } */
/* { dg-add-options bind_pic_locally } */
namespace std {
extern "C" void puts(const char *s);
}
template <class T, class E> void
foreach (T b, T e, E ptr)
{
for (; b != e; b++)
ptr(*b);
}
void
inline_me (char *x)
{
std::puts(x);
}
static void
inline_me_too (char *x)
{
std::puts(x);
}
int main(int argc, char **argv)
{
foreach (argv, argv + argc, inline_me);
foreach (argv, argv + argc, inline_me_too);
}
/* { dg-final { scan-tree-dump-times "Inlining void inline_me\\(" 1 "einline2"} } */
/* { dg-final { scan-tree-dump-times "Inlining void inline_me_too\\(" 1 "einline2"} } */
/* { dg-final { cleanup-tree-dump "einline2" } } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-einline2" } */
/* { dg-add-options bind_pic_locally } */
#include <algorithm>
namespace std {
extern "C" void puts(const char *s);
}
void
inline_me (char *x)
{
std::puts(x);
}
static void
inline_me_too (char *x)
{
std::puts(x);
}
int main(int argc, char **argv)
{
std::for_each (argv, argv + argc, inline_me);
std::for_each (argv, argv + argc, inline_me_too);
}
/* { dg-final { scan-tree-dump-times "Inlining void inline_me\\(" 1 "einline2"} } */
/* { dg-final { scan-tree-dump-times "Inlining void inline_me_too\\(" 1 "einline2"} } */
/* { dg-final { cleanup-tree-dump "einline2" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment