PR optimization/12180
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 3 Oct 2003 00:23:30 +0000 (00:23 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 3 Oct 2003 00:23:30 +0000 (00:23 +0000)
* tree-inline.c (inline_forbidden_p_1): Do not permit inlining of
functions containing calls to

PR optimization/12180
* gcc.dg/20031002-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72057 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20031002-1.c [new file with mode: 0644]
gcc/tree-inline.c

index 4d974fc..e0a7661 100644 (file)
@@ -1,3 +1,9 @@
+2003-10-02  Mark Mitchell  <mark@codesourcery.com>
+
+       PR optimization/12180
+       * tree-inline.c (inline_forbidden_p_1): Do not permit inlining of
+       functions containing calls to 
+
 2003-10-02  Chris Demetriou  <cgd@broadcom.com>
 
        * config/mips/mips.c (mips_emit_prefetch): Use operand 3
index 5d992b1..66b71f5 100644 (file)
@@ -1,5 +1,8 @@
 2003-10-02  Mark Mitchell  <mark@codesourcery.com>
 
+       PR optimization/12180
+       * gcc.dg/20031002-1.c: New test.
+
        PR c++/12486
        * g++.dg/inherit/error1.C: New test.
 
diff --git a/gcc/testsuite/gcc.dg/20031002-1.c b/gcc/testsuite/gcc.dg/20031002-1.c
new file mode 100644 (file)
index 0000000..fb80fbc
--- /dev/null
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void generic_sendmsg (char *fmt, ...)
+{
+  __builtin_next_arg(fmt);
+}
+
+void generic_sendstat()
+{
+  double t;
+
+  generic_sendmsg("F %3.2f", t);
+}
index 0cec45b..e2b08cd 100644 (file)
@@ -922,6 +922,8 @@ inline_forbidden_p_1 (tree *nodep, int *walk_subtrees ATTRIBUTE_UNUSED,
             arguments.  */
        case BUILT_IN_VA_START:
        case BUILT_IN_STDARG_START:
+       case BUILT_IN_NEXT_ARG:
+       case BUILT_IN_VA_END:
          {
            inline_forbidden_reason
              = N_("%Jfunction '%F' can never be inlined because it "