Re: isolated the problem

2000-12-12 Thread Alan Shutko

Mate Wierdl <[EMAIL PROTECTED]> writes:

> If people verify this also with the original glibc (not the updated
> one), I'll submit a bugreport to gcc (and leave this list alone).

Verified with updated libc... don't have the original handy.  Please
don't send it to GCC, send it to http://bugzilla.redhat.com/bugzilla/
.  Red Hat is maintaining the compiler they shipped.

If you don't want to hassle with Bugzilla, let me know and I'll do it.

-- 
Alan Shutko <[EMAIL PROTECTED]> - In a variety of flavors!
This sentence no verb.




isolated the problem

2000-12-12 Thread Mate Wierdl

So now I made a selfcontained ource file which exhibits the `dirname'
problem. 

The file is at 

http://thales.memphis.edu/~tetex/try3.c

See  if you can get, on your RH 7.0 system,

# gcc -Wall -O2 try3.c
# ./a.out 
name /p/q/a-b-c/kpsewhich, dirname /p/q/a-b-c
name /p/q/a-b-c, dirname /p/q/a-b
name /p/q/a-b, dirname /p/q/a

# gcc -Wall -O try3.c
# ./a.out 
name /p/q/a-b-c/kpsewhich, dirname /p/q/a-b-c
name /p/q/a-b-c, dirname /p/q
name /p/q/a-b, dirname /p/q

If people verify this also with the original glibc (not the updated
one), I'll submit a bugreport to gcc (and leave this list alone).

There is no problem with kgcc.

Mate



Re: now I think this is a bug

2000-12-12 Thread Alan Shutko

Mate Wierdl <[EMAIL PROTECTED]> writes:

> Perhaps one should collect the necessary defines from the .h files
> into a single one, and send it along with try2.c to the gcc
> developers so that they have a standalone test suite. 

That would be a good idea, but if you're using the RHL7 gcc, you
should send the report to the RH folks, not the gcc folks.  

-- 
Alan Shutko <[EMAIL PROTECTED]> - In a variety of flavors!
There's no such thing as pure pleasure; some anxiety always goes with it.




Re: now I think this is a bug

2000-12-12 Thread Mate Wierdl

I now did fresh

cd teTeX-1.0/texk/kpathsea
./configure 
make
mkdir a-b-c
cp -a kpsewhich a-b-c

and got

./a-b-c/kpsewhich -expand-var='$SELFAUTODIR'
/usr/local/src/teTeX-1.0/texk/kpathsea/a-b

So I now try to isolate the problem.  First off, simple optimization
`-O' is no problem; the problem occurs only with `-O2'. 

I created the try2.c found at 

http://thales.memphis.edu/~tetex/try2.c

It is basically texk/kpathsea/xdirname.c and texk/kpathsea/xmalloc.c,
but I changed the TEST ifdef to 

#ifdef TEST

char *tab[] = {
  "/p/q/a-b-c/kpsewhich",
  "/p/q/a-b-c",
  "/p/q/a-b",
  NULL 
};

int main()
{
  char **p;
  for (p = tab; *p; p++)
printf("name %s, dirname %s\n", *p, xdirname(*p));
  return 0;
}
#endif /* TEST */

Putting try2.c in the top teTeX source directory, teTeX-1.0/, I do

# cc -g -O2 -Wall -I./texk  -DTEST try2.c
# ./a.out 
name /p/q/a-b-c/kpsewhich, dirname /p/q/a-b-c
name /p/q/a-b-c, dirname /p/q/a-b
name /p/q/a-b, dirname /p/q/a

So the ouch is already here. All is well, if I replace `-O2' by `-O':

# cc -g -O -Wall -I./texk  -DTEST try2.c
# ./a.out 
name /p/q/a-b-c/kpsewhich, dirname /p/q/a-b-c
name /p/q/a-b-c, dirname /p/q
name /p/q/a-b, dirname /p/q

I would try to isolate further but 

1) For my untrained eyes, it is rather discouraging to see function
   definitions via macros

   xmalloc P1C(unsigned, size)  
   xdirname P1C(const_string, name)

2) Perhaps somebody knowing the code could easily point out the real
   problem.

My only idea at this point would be to create and look at the assembly
code.  

Perhaps one should collect the necessary defines from the .h files
into a single one, and send it along with try2.c to the gcc
developers so that they have a standalone test suite. 

Mate







Re: now I think this is a bug

2000-12-12 Thread Clayton Weaver

Do you still have a kgcc (gcc-2.91.66) with RH 7.0 for compiling
kernels? Try compiling it with that. If it works, you don't have
to give up optimization to accomodate a gcc-2.96 bug.

Regards,

Clayton Weaver

(Seattle)

"Everybody's ignorant, just in different subjects."  Will Rogers






Re: now I think this is a bug

2000-12-12 Thread David Lloyd


Hmmm!

> > # gcc -v
> > Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
> > gcc version 2.96 2731 (Red Hat Linux 7.0)
> 
> And still: I think that your compiler is broken.

RedHat GCC 2.96 cannot compile the kernel. Try using kgcc and see what
comes up...

DL
-- 
The new century begins at the end of this month;
 let the celebrations be brought forth
 let the people rejoice
God Bless the Queen!