This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/19337] [4.0 Regression] ada does not compile at -O3 (nested functions related)
- From: "hubicka at ucw dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2005 00:07:16 -0000
- Subject: [Bug tree-optimization/19337] [4.0 Regression] ada does not compile at -O3 (nested functions related)
- References: <20050108205103.19337.heitkamp@ameritech.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From hubicka at ucw dot cz 2005-01-13 00:07 -------
Subject: Re: [4.0 Regression] ada does not compile at -O3 (nested functions related)
Testing attached patch
void write_char(char);
int len(char*);
void f(char *a)
{
int col = 0;
int i;
void wchar(char c)
{
if (c == '\t')
{
do {
wchar(' ');
} while ((col%8)!=0);
}
else
{
write_char (c);
col++;
}
}
for(i =0;i<len(a);i++)
{
wchar(*a);
}
}
2005-01-13 Jan Hubicka <jh@suse.cz>
PR tree-optimize/19337
* tree-inlie.c (initialize_inlined_parameters): Copy
saved_static_chain_decl only.
Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.162
diff -c -3 -p -r1.162 tree-inline.c
*** tree-inline.c 4 Jan 2005 01:54:25 -0000 1.162
--- tree-inline.c 13 Jan 2005 00:04:22 -0000
*************** initialize_inlined_parameters (inline_da
*** 808,813 ****
--- 809,816 ----
/* Initialize the static chain. */
p = DECL_STRUCT_FUNCTION (fn)->static_chain_decl;
+ if (DECL_STRUCT_FUNCTION (fn)->saved_static_chain_decl)
+ p = DECL_STRUCT_FUNCTION (fn)->saved_static_chain_decl;
if (p)
{
/* No static chain? Seems like a bug in tree-nested.c. */
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19337