This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: powerpc-ibm-aix4.3.3.0 bootstrap issue


> Date: Wed, 24 Oct 2001 14:48:05 -0700
> From: Richard Henderson <rth@redhat.com>
> To: mike stump <mrs@windriver.com>

> On Wed, Oct 24, 2001 at 02:42:59PM -0700, mike stump wrote:
> > > From: Alexandre Oliva <aoliva@redhat.com>
> > > Date: 24 Oct 2001 17:48:35 -0200
> > 
> > > But I still don't see how this would lead to bootstrap compare
> > > failures, or to differences not showing up when the compiler is run
> > > inside a debugger.
> > 
> > For much the same reason that:
> [...]
> > might print Hi, or Hello.

> No.  The important part is >>when .. run inside a debugger<<.

No, the important part is bootstrap failure...  That was the part I
was mainly answering.

> The important part is >>when .. run inside a debugger<<.

bootstrap failures are in some ways, more important that differing
results in gdb.

> Nothing should change when run inside a debugger except timing, and
> gcc is not timing sensitive.

I agree, in a perfect world, this is the case.  However, if gcc ever
has a bug (and sometimes, it does), say, something like:

$ cat t5.c
main() {
       char *a[2];
       printf("%d\n", a);
       a[0]=strdup("Hi");
       a[1]=strdup("Hello");
       qsort (a, 2, sizeof(char*), strcmp);
       printf("%s\n", a[0]);
}

$ a.out
-4264688
Hi.

$ gdb a.out
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.5.1"...

NAT>run
Starting program: /tmp/a.out
-4264680

then the behavior _can_ be dependent on such things.  We _can_ agree
that nothing in gcc should be sensitive to these things.  I was
answering the question of what to watch out for and _how_ it could
possibly be the case, _given_ that it happens.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]