This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/52691] New: va_start to builtin_next_arg optimization lost
- From: "bigotp at acm dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Mar 2012 17:57:20 +0000
- Subject: [Bug c/52691] New: va_start to builtin_next_arg optimization lost
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52691
Bug #: 52691
Summary: va_start to builtin_next_arg optimization lost
Classification: Unclassified
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: bigotp@acm.org
In the commit below, the following edit was made which inverted the sense of
the test, preventing the optimization from applying when it should. A ! must
be inserted before builtin_decl_explicit_p.
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index e207e23..31c31c1 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -2175,7 +2175,7 @@ optimize_stdarg_builtin (gimple call)
case BUILT_IN_VA_START:
if (!va_list_simple_ptr
|| targetm.expand_builtin_va_start != NULL
- || built_in_decls[BUILT_IN_NEXT_ARG] == NULL)
+ || builtin_decl_explicit_p (BUILT_IN_NEXT_ARG))
return NULL_TREE;
if (gimple_call_num_args (call) != 2)
commit b9a1687032fc1afb5f4e9d8dfa775a134abe21ba
Author: meissner <meissner@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue Oct 11 19:55:09 2011 +0000
Convert standard builtin functions from being arrays to using a functional
interface
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179820
138bc75d-0d04-0410-961f-82ee72b054a4