]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/8613 (-O2 optimization generates wrong code)
authorGlen Nakamura <glen@imodulo.com>
Fri, 21 Feb 2003 08:18:06 +0000 (08:18 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 21 Feb 2003 08:18:06 +0000 (08:18 +0000)
PR optimization/8613
* builtins.c (expand_builtin): Emit postincrements before expanding
builtin functions.

From-SVN: r63211

gcc/ChangeLog
gcc/builtins.c
gcc/testsuite/ChangeLog

index 13bcb1af571d4caaddc87a46ce1f99829a3f4f7f..2eebd73d84d5d53719e743320257a052ce261f26 100644 (file)
@@ -1,3 +1,9 @@
+2003-02-21  Glen Nakamura  <glen@imodulo.com>
+
+       PR optimization/8613
+       * builtins.c (expand_builtin): Emit postincrements before expanding
+       builtin functions.
+
 2003-02-20  Randolph Chung  <tausq@debian.org>
             Eric Botcazou  <ebotcazou@libertysurf.fr>
 
index d8874d6a1473b836a9b6501e8a2b3610bc7a1a58..29dfa26e148c7240bca20ba0566ac64c37613442 100644 (file)
@@ -3600,6 +3600,9 @@ expand_builtin (exp, target, subtarget, mode, ignore)
   tree arglist = TREE_OPERAND (exp, 1);
   enum built_in_function fcode = DECL_FUNCTION_CODE (fndecl);
 
+  /* Perform postincrements before expanding builtin functions.  */
+  emit_queue ();
+
   if (DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_MD)
     return (*targetm.expand_builtin) (exp, target, subtarget, mode, ignore);
 
index f82d3a37f650ee4c0e6308dfb4603042fe99e5e5..0ddc4c38bf6b109627540403e65509fb992a9227 100644 (file)
@@ -1,3 +1,7 @@
+2003-02-21  Glen Nakamura  <glen@imodulo.com>
+
+       * gcc.c-torture/execute/20030221-1.c: New test.
+
 2003-02-20  Randolph Chung  <tausq@debian.org>
 
        * gcc.c-torture/compile/20030220-1.c: New test.