From: Uros Bizjak Date: Tue, 8 May 2007 06:48:15 +0000 (+0200) Subject: re PR target/31854 (internal compiler error: in cgraph_local_info, at cgraph.c:618) X-Git-Tag: releases/gcc-4.3.0~5180 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac97d816a6cbc700f4808223e21d6bdb50e4dd66;p=thirdparty%2Fgcc.git re PR target/31854 (internal compiler error: in cgraph_local_info, at cgraph.c:618) PR target/31854 * config/i386/i386.c (ix86_function_regparm): Process local functions only when TREE_CODE (decl) equals FUNCTION_DECL. From-SVN: r124538 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 22b09d4fc5fe..a53783538ee3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-05-08 Uros Bizjak + + 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 * doc/invoke.texi (Warning Options): Document that -Wempty-body diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index a3936546d7b0..7e2accf4625b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -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) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 894e2ca44d76..6ba856d98685 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-05-08 Uros Bizjak + + PR target/31854 + * gcc.target/i386/pr31854.c: New test. + 2007-05-07 Janis Johnson * gcc.dg/pch/pch.exp: XFAIL largefile on Solaris 10 x86. @@ -12,8 +17,8 @@ 2007-05-07 Uros Bizjak - * 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 diff --git a/gcc/testsuite/gcc.target/i386/pr31854.c b/gcc/testsuite/gcc.target/i386/pr31854.c new file mode 100644 index 000000000000..d5dca57ea630 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr31854.c @@ -0,0 +1,10 @@ +/* { dg-do compile { target dfp } } */ +/* { dg-options "-O -std=gnu99" } */ + +_Decimal128 d128; +long double tf; + +void foo (void) +{ + d128 = tf; +}