This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/15438] [3.5 Regression] miscompilation with attribute (__malloc__)
- From: "dnovillo at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 May 2004 18:25:15 -0000
- Subject: [Bug tree-optimization/15438] [3.5 Regression] miscompilation with attribute (__malloc__)
- References: <20040514162618.15438.belyshev@lubercy.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dnovillo at redhat dot com 2004-05-17 18:25 -------
Subject: Re: [3.5 Regression] miscompilation
with attribute (__malloc__)
On Mon, 2004-05-17 at 04:10, steven at gcc dot gnu dot org wrote:
> ------- Additional Comments From steven at gcc dot gnu dot org 2004-05-17 08:10 -------
> Simpler test case:
> ====================================
> int a;
>
> void __attribute__ ((malloc)) *foo ()
> {
> a = 0;
> }
>
> void bar (void)
> {
> a = 1;
> foo ();
> if (a)
> abort ();
> }
> ====================================
>
> -->
> bar ()
> {
> int<D0> a.0<D1457>;
>
> # a<D1451>_2 = VDEF <a<D1451>_1>;
> a<D1451> = 1;
> # VUSE <a<D1451>_2>;
> foo ();
> abort ();
> }
>
The patch in comment #10 is OK.
I had added a call to ignore ECF_MALLOC in the big alias re-write
(http://gcc.gnu.org/ml/gcc-patches/2004-02/msg00891.html). I offer no
reasonable explanation for the change, so I guess the lack of test cases
in the testsuite allowed that brain fart to slip in.
Could you also add this test case to the testsuite?
Thanks. Diego.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15438