This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: alias patch
- To: Chandra Chavva <cchavva at cygnus dot com>
- Subject: Re: alias patch
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 28 Jun 2000 21:02:33 -0600
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <Pine.SOL.3.91.1000627172534.23541U@emperor.cygnus.com>you write:
> #include <stdio.h>
> void main( void )
> {
> int i = 0 , j ;
> int a[2] = { 0, 1 } ;
>
> while ( i == 0 ){
> a[0] = 2 ;
> for ( j = 1 ; j < 2 ; j++) {
> a[j] = a[j-1] ;
> }
> i++ ;
> }
>
> if( a[1] == 2 ) {
> printf( "%-12s %04d:OK \n", __FILE__, __LINE__ ) ;
> } else {
> printf( "%-12s %04d:NG (a[1,2]-->a[%d,%d])\n",
> __FILE__,__LINE__,a[0],a[1]) ;
> }
> }
Can you please turn this into a standard testcase so that we can include
it in our regression testsuite.
Note that main's return value/argument types are incorrect and should be
fixed.
> I have come up with the patch with the help of Geoff Keating which fixes
> this problem.
>
> It is okay to apply.
>
> Thanks
> Chandra
>
> alias.c (find_base_value) : Added more checks to return reg_base_value.
I'm not rejecting or accepting it right now, because I think you need to
give us some explanation why this patch fixes the bug.
jeffk