This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: c/1534: ICE probably due to uninitialized memory
- To: <drepper at redhat dot com>
- Subject: Re: c/1534: ICE probably due to uninitialized memory
- From: Bernd Schmidt <bernds at redhat dot com>
- Date: Tue, 2 Jan 2001 18:38:25 +0000 (GMT)
- Cc: <gcc-gnats at gcc dot gnu dot org>, <gcc-prs at gcc dot gnu dot org>,<gcc-bugs at gcc dot gnu dot org>, <gcc-patches at gcc dot gnu dot org>
On 2 Jan 2001 drepper@redhat.com wrote:
> gcc -c -O2 maccess.i
>
> Don't use -O nor -O3. I hope it's reproducible for whoever handles this. I get
>
> drepper@myware build$ gcc -c -O2 maccess.i
> maccess.i: In function `SetBitMem':
> maccess.i:688: Virtual array reg_n_info[73]: element 73 out of bounds
> maccess.i:688: Internal compiler error in mark_set_1, at flow.c:4760
This patch fixes it for me. I'll check it in once bootstrap & tests
complete.
Bernd
* builtins.c (expand_builtin_return_addr): Don't use MEM_ALIAS_SET on
a REG rtx.
Index: builtins.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/builtins.c,v
retrieving revision 1.83
diff -u -p -r1.83 builtins.c
--- builtins.c 2000/12/28 02:45:37 1.83
+++ builtins.c 2001/01/02 18:36:52
@@ -431,8 +431,9 @@ expand_builtin_return_addr (fndecl_code,
tem = DYNAMIC_CHAIN_ADDRESS (tem);
#endif
tem = memory_address (Pmode, tem);
- tem = copy_to_reg (gen_rtx_MEM (Pmode, tem));
+ tem = gen_rtx_MEM (Pmode, tem);
MEM_ALIAS_SET (tem) = get_frame_alias_set ();
+ tem = copy_to_reg (tem);
}
/* For __builtin_frame_address, return what we've got. */