* builtins.c (expand_builtin): Don't check DECL_ASSEMBLER_NAME_SET_P.
PR target/51867
* testsuite/c-c++-common/dfp/signbit-2.c: Change '-O0' to '-O1'.
* testsuite/gcc.dg/pr51867.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184037
138bc75d-0d04-0410-961f-
82ee72b054a4
+2012-02-09 Bin Cheng <bin.cheng@arm.com>
+
+ PR middle-end/51867
+ * builtins.c (expand_builtin): Don't check DECL_ASSEMBLER_NAME_SET_P.
+
2012-02-08 Magnus Granberg <zorry@gentoo.org>
PR driver/48524
set of builtins. */
if (!optimize
&& !called_as_built_in (fndecl)
- && DECL_ASSEMBLER_NAME_SET_P (fndecl)
&& fcode != BUILT_IN_ALLOCA
&& fcode != BUILT_IN_ALLOCA_WITH_ALIGN
&& fcode != BUILT_IN_FREE)
+2012-02-09 Bin Cheng <bin.cheng@arm.com>
+
+ PR middle-end/51867
+ * testsuite/c-c++-common/dfp/signbit-2.c: Change '-O0' to '-O1'.
+ * testsuite/gcc.dg/pr51867.c: New test.
+
2012-02-09 Ian Lance Taylor <iant@google.com>
* go.test/go-test.exp (go-gc-tests): Don't run stack.go on systems
-/* { dg-options "-O0" } */
+/* { dg-options "-O1" } */
/* Check that the compiler uses builtins for signbit; if not the link
will fail because library functions are in libm. */
+/* See PR51867.
+ Since GCC uses library call when optimizing for "-O0", this test
+ case requires at least "-O1" level optimization now. */
#include "dfp-dbg.h"
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O0 -fno-math-errno -fdump-rtl-expand" } */
+#include <math.h>
+
+float a(float x)
+{
+ return sqrtf(x);
+}
+float b(float x)
+{
+ return sqrtf(x);
+}
+/* Here the calls to sqrtf should be expanded into CALL_INSNs, rather than
+ fpu sqrtf rtl patterns. */
+/* { dg-final { scan-rtl-dump-times "call_insn" 2 "expand" } } */
+/* { dg-final { cleanup-rtl-dump "expand" } } */