Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Backport patch for Bug 54988

  • Loading branch information...
commit 7a0912e7a20a087772d334d1789c2437f48d8feb 1 parent 8c4eda5
@Alexpux authored
View
52 patches/gcc/gcc-4.7.2-dont-return-early-if-attributes-is-NULL.patch
@@ -0,0 +1,52 @@
+ Backported from mainline
+ 2012-10-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/54988
+ * decl2.c (cplus_decl_attributes): Don't return early
+ if attributes is NULL.
+
+ * c-c++-common/pr54988.c: New test.
+--- /dev/null 2012/01/19 22:15:26 183313
++++ trunk/gcc/testsuite/c-c++-common/pr54988.c 2012/01/23 20:48:31 183455
+@@ -0,0 +1,20 @@
++ /* PR c++/54988 */
++ /* { dg-do compile } */
++ /* { dg-options "-O2" } */
++ /* { dg-additional-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
++
++ #if defined(__i386__) || defined(__x86_64__)
++ #pragma GCC target "fpmath=sse"
++ #endif
++
++ static inline __attribute__ ((always_inline)) int
++ foo (int x)
++ {
++ return x;
++ }
++
++ int
++ bar (int x)
++ {
++ return foo (x);
++ }
+--- trunk/gcc/cp/decl2.c 2012/11/05 15:05:42 193164
++++ trunk/gcc/cp/decl2.c 2012/11/05 15:07:14 193165
+@@ -1302,8 +1302,7 @@
+ cplus_decl_attributes (tree *decl, tree attributes, int flags)
+ {
+ if (*decl == NULL_TREE || *decl == void_type_node
+- || *decl == error_mark_node
+- || attributes == NULL_TREE)
++ || *decl == error_mark_node)
+ return;
+
+ if (processing_template_decl)
+@@ -1312,8 +1311,6 @@
+ return;
+
+ save_template_attributes (&attributes, decl);
+- if (attributes == NULL_TREE)
+- return;
+ }
+
+ cp_check_const_attributes (attributes);
View
1  scripts/gcc-4.7.2.sh
@@ -47,6 +47,7 @@ PRIORITY=main
PATCHES=(
gcc/gcc-4.7-stdthreads.patch
gcc/gcc-4.7-iconv.patch
+ gcc/gcc-4.7.2-dont-return-early-if-attributes-is-NULL.patch
)
#
Please sign in to comment.
Something went wrong with that request. Please try again.