]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/31854 (internal compiler error: in cgraph_local_info, at cgraph.c:618)
authorUros Bizjak <ubizjak@gmail.com>
Tue, 8 May 2007 06:48:15 +0000 (08:48 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Tue, 8 May 2007 06:48:15 +0000 (08:48 +0200)
PR target/31854
* config/i386/i386.c (ix86_function_regparm): Process local
functions only when TREE_CODE (decl) equals FUNCTION_DECL.

From-SVN: r124538

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr31854.c [new file with mode: 0644]

index 22b09d4fc5fe517805ec9d2fed64b0e1d4d74e4c..a53783538ee3506bb10bd867e7903eab0ade9e57 100644 (file)
@@ -1,3 +1,9 @@
+2007-05-08  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/31854
+       * config/i386/i386.c (ix86_function_regparm): Process local
+       functions only when TREE_CODE (decl) equals FUNCTION_DECL.
+       
 2007-05-07  Mike Stump  <mrs@apple.com>
 
        * doc/invoke.texi (Warning Options): Document that -Wempty-body
index a3936546d7b01998c556e77578e67019fcd4fa32..7e2accf4625b4c6fae6a8301bd97f9311dadb7b6 100644 (file)
@@ -2792,7 +2792,8 @@ ix86_function_regparm (tree type, tree decl)
     return 2;
 
   /* Use register calling convention for local functions when possible.  */
-  if (decl && flag_unit_at_a_time && !profile_flag)
+  if (decl && TREE_CODE (decl) == FUNCTION_DECL
+      && flag_unit_at_a_time && !profile_flag)
     {
       struct cgraph_local_info *i = cgraph_local_info (decl);
       if (i && i->local)
index 894e2ca44d76deac10c958b9b5547b6977999703..6ba856d986852ade443bda30fe8e1b9b675d1a96 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-08  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/31854
+       * gcc.target/i386/pr31854.c: New test.
+       
 2007-05-07  Janis Johnson  <janis187@us.ibm.com>
 
        * gcc.dg/pch/pch.exp: XFAIL largefile on Solaris 10 x86.
@@ -12,8 +17,8 @@
 
 2007-05-07  Uros Bizjak  <ubizjak@gmail.com>
 
-       * gcc.dg/dfp/convert-bfp-fold.c: Remove extra assignment to
-       sf variable.  Rearrange conversions from binary float to decimal float.
+       * gcc.dg/dfp/convert-bfp-fold.c: Remove extra assignment to 'sf'
+       variable.  Rearrange conversions from binary float to decimal float.
 
 2007-05-07  Mark Mitchell  <mark@codesourcery.com>
 
diff --git a/gcc/testsuite/gcc.target/i386/pr31854.c b/gcc/testsuite/gcc.target/i386/pr31854.c
new file mode 100644 (file)
index 0000000..d5dca57
--- /dev/null
@@ -0,0 +1,10 @@
+/* { dg-do compile { target dfp } } */
+/* { dg-options "-O -std=gnu99" } */
+
+_Decimal128 d128;
+long double tf;
+
+void foo (void)
+{
+  d128 = tf;
+}