[Bug tree-optimization/15438] [3.5 Regression] miscompilation with attribute (__malloc__)

dnovillo at redhat dot com gcc-bugzilla@gcc.gnu.org
Tue May 18 10:13:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list