[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2012-12-22 Thread danglin at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746



John David Anglin danglin at gcc dot gnu.org changed:



   What|Removed |Added



 CC||bugzilla-gcc at

   ||thewrittenword dot com



--- Comment #28 from John David Anglin danglin at gcc dot gnu.org 2012-12-23 
04:30:02 UTC ---

*** Bug 53327 has been marked as a duplicate of this bug. ***


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-17 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #23 from John David Anglin danglin at gcc dot gnu.org 2011-07-17 
21:27:01 UTC ---
Author: danglin
Date: Sun Jul 17 21:26:59 2011
New Revision: 176377

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=176377
Log:
PR target/49746
Revert:
2010-12-30  John David Anglin  dave.ang...@nrc-cnrc.gc.ca

* config/pa/pa.md: Add ,* condition to 64-bit add/subtract boolean
patterns.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/pa/pa.md


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-17 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #24 from John David Anglin danglin at gcc dot gnu.org 2011-07-17 
21:30:35 UTC ---
Author: danglin
Date: Sun Jul 17 21:30:33 2011
New Revision: 176378

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=176378
Log:
PR target/49746
Revert:
2010-12-30  John David Anglin  dave.ang...@nrc-cnrc.gc.ca

* config/pa/pa.md: Add ,* condition to 64-bit add/subtract boolean
patterns.


Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/config/pa/pa.md


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-17 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #25 from John David Anglin danglin at gcc dot gnu.org 2011-07-17 
21:32:59 UTC ---
Author: danglin
Date: Sun Jul 17 21:32:56 2011
New Revision: 176379

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=176379
Log:
PR target/49746
Revert:
2010-12-30  John David Anglin  dave.ang...@nrc-cnrc.gc.ca

* config/pa/pa.md: Add ,* condition to 64-bit add/subtract boolean
patterns.


Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/config/pa/pa.md


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-17 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #26 from John David Anglin danglin at gcc dot gnu.org 2011-07-17 
21:36:39 UTC ---
Author: danglin
Date: Sun Jul 17 21:36:36 2011
New Revision: 176380

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=176380
Log:
PR target/49746
Revert:
2010-12-30  John David Anglin  dave.ang...@nrc-cnrc.gc.ca

* config/pa/pa.md: Add ,* condition to 64-bit add/subtract boolean
patterns.


Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/config/pa/pa.md


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-17 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

John David Anglin danglin at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||danglin at gcc dot gnu.org
 Resolution||FIXED

--- Comment #27 from John David Anglin danglin at gcc dot gnu.org 2011-07-17 
21:43:32 UTC ---
Build issue should be fixed.  Please open new PR if socket issue
is GCC bug.


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-16 Thread dave.anglin at bell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #22 from dave.anglin at bell dot net 2011-07-16 13:13:45 UTC ---
On 15-Jul-11, at 11:59 PM, h.m.brand at xs4all dot nl wrote:

 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

 --- Comment #20 from H.Merijn Brand h.m.brand at xs4all dot nl  
 2011-07-16 03:59:31 UTC ---
 On Fri, 15 Jul 2011 19:15:28 +, dave.anglin at bell dot net
 gcc-bugzi...@gcc.gnu.org wrote:

 I think the attached change will fix the bug.

 Apparently it did! Dave++

 I guess this will be in 4.6.2

Yes.  This is regression.  I messed up fixing the handling of 64-bit  
add/sub conditions
and incorrectly changed addi/subi.  They don't have 64-bit  
conditions.  This stemmed
from a change to binutils that broke the handling of 64-bit conditions  
completely.


 For 64bit perl:

 Test Summary Report
 ---
 re/reg_eval.t
 (Wstat: 0
 Tests: 7 Failed: 3)
  Failed tests:  4-6
 ../cpan/CGI/t/tmpdir.t   
 (Wstat: 0
 Tests: 9 Failed: 0)
  TODO passed:   3-9
 ../dist/IO/t/io_multihomed.t 
 (Wstat: 7424
 Tests: 1 Failed: 0)
  Non-zero exit status: 29
  Parse errors: Bad plan.  You planned 8 tests but ran 1.
 ../dist/IO/t/io_sock.t   
 (Wstat: 7424
 Tests: 1 Failed: 0)
  Non-zero exit status: 29
  Parse errors: Bad plan.  You planned 26 tests but ran 1.
 ../dist/IO/t/io_udp.t
 (Wstat: 9
 Tests: 0 Failed: 0)
  Non-zero wait status: 9
  Parse errors: Bad plan.  You planned 7 tests but ran 0.
 ../dist/Net-Ping/t/450_service.t 
 (Wstat: 7424
 Tests: 3 Failed: 0)
  Non-zero exit status: 29
  Parse errors: Bad plan.  You planned 26 tests but ran 3.
 ../dist/Net-Ping/t/510_ping_udp.t
 (Wstat: 65280
 Tests: 1 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 2 tests but ran 1.
 ../ext/Socket/t/Socket.t 
 (Wstat: 7424
 Tests: 2 Failed: 0)
  Non-zero exit status: 29
  Parse errors: Bad plan.  You planned 26 tests but ran 2.
 Files=2144, Tests=465226, 1241 wallclock secs (272.44 usr 30.32 sys  
 + 1799.09
 cusr 204.72 csys = 2306.57 CPU)
 Result: FAIL

 So gcc-4 still fails the socket stuff


Does aCC work in 64-bit mode?  We need this narrowed to a C testcase  
if it's a GCC bug.

I'm also seeing a socket test fail randomly in the Ada gnat testsuite  
with 32-bit hppa*-*-hpux*.

Dave
--
John David Anglindave.ang...@bell.net


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread h.m.brand at xs4all dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #4 from H.Merijn Brand h.m.brand at xs4all dot nl 2011-07-15 
07:39:01 UTC ---
On Thu, 14 Jul 2011 20:34:46 +, sje at cup dot hp.com
gcc-bugzi...@gcc.gnu.org wrote:

 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746
 
 Steve Ellcey sje at cup dot hp.com changed:
 
 --- Comment #2 from Steve Ellcey sje at cup dot hp.com 2011-07-14 20:34:28 
 UTC ---
 Are you trying to use a 32 bit GCC to bootstrap a 64 bit GCC?

No, a full 64bit gcc-3.4.6

 I see you have CC set to gcc64 which makes me think that you are using

gcc32 is a symlink to /usr/local/pa20_32/bin/gcc
gcc64 is a symlink to /usr/local/pa20_64/bin/gcc

While building gcc-4.6.1, I made sure /usr/local/pa20_64/bin is in the
front of my $PATH

 a 64 bit GCC to do the bootstrap but you have -mpa-risc-2-0 in CFLAGS,

I do so because I know some configurations store the flags to be used
later by other applications. If this is a problem, I'll leave it off.

 which I think means the 32 bit 2.0 instruction set and I don't think it
 should be used for 64 bit builds.
 
 Can you bootstrap if you leave off the -mpa-risc-2-0 flag?

I'll try


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread h.m.brand at xs4all dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #5 from H.Merijn Brand h.m.brand at xs4all dot nl 2011-07-15 
08:34:49 UTC ---
On Thu, 14 Jul 2011 22:07:10 +, dave.anglin at bell dot net
gcc-bugzi...@gcc.gnu.org wrote:

 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746
 
 --- Comment #3 from dave.anglin at bell dot net 2011-07-14 22:06:49 UTC ---
 On 7/14/2011 4:35 PM, sje at cup dot hp.com wrote:
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746
 
  --- Comment #2 from Steve Ellceysje at cup dot hp.com  2011-07-14 
  20:34:28 UTC ---
  Are you trying to use a 32 bit GCC to bootstrap a 64 bit GCC?  I see you 
  have
  CC set to gcc64 which makes me think that you are using a 64 bit GCC to do 
  the
  bootstrap but you have -mpa-risc-2-0 in CFLAGS, which I think means the 32 
  bit
  2.0 instruction set and I don't think it should be used for 64 bit builds.
 
  Can you bootstrap if you leave off the -mpa-risc-2-0 flag

 The flag shouldn't matter.  hppa64 is always PA 2.0.  hppa64 is also 
 always PIC, so -fPIC is also redundant.
 
 The issue is with the bootstrap compiler gcc64.  Is it actually 3.4.6 
 (gcc64 -v)?

Yes, as I said in my OP

$ gcc64 -v
Reading specs from
/wrk/pa20_64-4.6.1/bin/../lib/gcc/hppa64-hp-hpux11.11/3.4.6/specs
Configured with: ../src/configure --enable-languages=c,c++
--prefix=/usr/local/pa20_64 --with-local-prefix=/usr/local/pa20_64
--with-gnu-as --with-as=/usr/local/pa20_64/bin/as --without-gnu-ld
--with-ld=/usr/ccs/bin/ld --disable-shared --disable-nls
--host=hppa64-hp-hpux11.11
Thread model: single
gcc version 3.4.6

 Did gmp and mpfr compile and check ok with it?

Yes, as I said in my OP

 These need to be 64-bit.

They are

$ file /usr/local/pa20_64/lib/libmpfr.sl
/usr/local/pa20_64/lib/libmpfr.sl:  ELF-64 shared object file - PA-RISC 2.0
(LP64)
$ file /usr/local/pa20_64/lib/libmpc.sl
/usr/local/pa20_64/lib/libmpc.sl:   ELF-64 shared object file - PA-RISC 2.0
(LP64)
$ file /usr/local/pa20_64/lib/libgmp.sl
/usr/local/pa20_64/lib/libgmp.sl:   ELF-64 shared object file - PA-RISC 2.0
(LP64)

 The 64-bit 3.X versions of hppa64 were somewhat buggy and there were 
 also some buggy distributions.

I build it myself from scratch. I never managed to build a gcc-4.x.x on
PA-RISC: All 64bit versions did not pass the perl compile test

 If your gcc64 compiled gmp and mpfr ok, I would suggest trying to build 
 a early 4.X release, then jump to 4.6.

I've tried and tried but always failed to get a reliable working 4.x

 This may avoid the out of range field.

So in fact you suggest to build an unreliable 4.x, then use it to build
4.6.1 hoping *that* would be reliable?

 I think that you also need a separate 64-bit version of gas.  I'm not 
 sure SOM and ELF can be supported with a single gas binary.

All binaries in /usr/local/pa20_64/bin are 64bit:

$ file /usr/local/pa20_64/bin/*as
/usr/local/pa20_64/bin/as:  ELF-64 executable object file - PA-RISC 2.0
(LP64)
/usr/local/pa20_64/bin/gas: ELF-64 executable object file - PA-RISC 2.0
(LP64)

 HP uses a wrapper.  I always compiler two separate versions of binutils.

I do so too

 GCC on PA-RISC can't easily support both 32 and 64-bit targets because 
 of the differences between SOM and ELF.

I know

 This is not a blocker since the bug is in the bootstrap compiler.
 
 If you add -save-temps to the failing compile, this will save the 
 assembler output.  This will allow inspection of the problematic
 instructions.  I would guess we are dealing with a bl or b instruction.
 A b,l instruction would have a 21-bit range.
 
 Dave


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread dave.anglin at bell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #6 from dave.anglin at bell dot net 2011-07-15 14:41:19 UTC ---
On 7/15/2011 4:37 AM, h.m.brand at xs4all dot nl wrote:
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

 --- Comment #5 from H.Merijn Brandh.m.brand at xs4all dot nl  2011-07-15 
 08:34:49 UTC ---
 On Thu, 14 Jul 2011 22:07:10 +, dave.anglin at bell dot net
 gcc-bugzi...@gcc.gnu.org  wrote:

 $ gcc64 -v
 Reading specs from
 /wrk/pa20_64-4.6.1/bin/../lib/gcc/hppa64-hp-hpux11.11/3.4.6/specs
 Configured with: ../src/configure --enable-languages=c,c++
 --prefix=/usr/local/pa20_64 --with-local-prefix=/usr/local/pa20_64
 --with-gnu-as --with-as=/usr/local/pa20_64/bin/as --without-gnu-ld
 --with-ld=/usr/ccs/bin/ld --disable-shared --disable-nls
 --host=hppa64-hp-hpux11.11
 Thread model: single
 gcc version 3.4.6

This looks ok.

 If you add -save-temps to the failing compile, this will save the
 assembler output.  This will allow inspection of the problematic
 instructions.  I would guess we are dealing with a bl or b instruction.
 A b,l instruction would have a 21-bit range.
To see what's wrong, the assembly code needs to be looked at.  The range 
that you
showed is characteristic of a 17-bit pc-relative branch.  In PA 2.0, 
calls use 21-bit
pc-relative branches.  If the .level directive is correct for the file, 
then the problem must
be due to an unconditional jump with an incorrect branch distance 
calculation.  I don't
believe there are any major problems with the branch distance 
calculations in 4.3 and
latter (last releases).

You might try working around this problem as follows:

1) Manually compile object that's failing with -O2.  This will reduce 
function sizes and
probably avoid the out of range error.  Then, restart bootstrap.  If 
build suceeds, install
new compiler and recheck that you can sucessfully bootstrap.  I suggest 
-O2 since
various reorg bugs appear at -O1.  This is simplest work around.

2) The other alternative is to abandon your gcc64 and build a new 
boostrap compiler
with HP aCC or C (ANSI).  I haven't tried this in some time.

3) I could provide you with a working bootstrap compiler. 
  Unfortunately, I can't make the file
publicly available.

If you get a working compiler going, it would be great if you could post 
it on the net as
you have done for some other builds.  Option 2 isn't that easy.

Dave


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread h.m.brand at xs4all dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #7 from H.Merijn Brand h.m.brand at xs4all dot nl 2011-07-15 
15:17:38 UTC ---
On Fri, 15 Jul 2011 14:41:23 +, dave.anglin at bell dot net
gcc-bugzi...@gcc.gnu.org wrote:

 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746
 
 --- Comment #6 from dave.anglin at bell dot net 2011-07-15 14:41:19 UTC ---
 On 7/15/2011 4:37 AM, h.m.brand at xs4all dot nl wrote:
  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746
 
  --- Comment #5 from H.Merijn Brandh.m.brand at xs4all dot nl  2011-07-15 
  08:34:49 UTC ---
  On Thu, 14 Jul 2011 22:07:10 +, dave.anglin at bell dot net
  gcc-bugzi...@gcc.gnu.org  wrote:
 
  $ gcc64 -v
  Reading specs from
  /wrk/pa20_64-4.6.1/bin/../lib/gcc/hppa64-hp-hpux11.11/3.4.6/specs
  Configured with: ../src/configure --enable-languages=c,c++
  --prefix=/usr/local/pa20_64 --with-local-prefix=/usr/local/pa20_64
  --with-gnu-as --with-as=/usr/local/pa20_64/bin/as --without-gnu-ld
  --with-ld=/usr/ccs/bin/ld --disable-shared --disable-nls
  --host=hppa64-hp-hpux11.11
  Thread model: single
  gcc version 3.4.6

 This looks ok.
 
  If you add -save-temps to the failing compile, this will save the
  assembler output.  This will allow inspection of the problematic
  instructions.  I would guess we are dealing with a bl or b instruction.
  A b,l instruction would have a 21-bit range.

 To see what's wrong, the assembly code needs to be looked at. The
 range that you showed is characteristic of a 17-bit pc-relative
 branch. In PA 2.0, calls use 21-bit pc-relative branches.  If the
 .level directive is correct for the file, then the problem must
 be due to an unconditional jump with an incorrect branch distance 
 calculation.  I don't believe there are any major problems with
 the branch distance calculations in 4.3 and latter (last releases).

I'm currently building with the 4.2.4 build I had lying around that
does not pass perl build/test. So far it goes much further. It is
already running (building) for over 4 hours now. The older the
architecture, the slower the machine :)

 You might try working around this problem as follows:
 
 1) Manually compile object that's failing with -O2.  This will
 reduce function sizes and probably avoid the out of range error.
 Then, restart bootstrap.  If build suceeds, install new compiler
 and recheck that you can sucessfully bootstrap.  I suggest 
 -O2 since various reorg bugs appear at -O1.  This is simplest
 work around.
 
 2) The other alternative is to abandon your gcc64 and build a new 
 boostrap compiler with HP aCC or C (ANSI).  I haven't tried this
 in some time.

I did. It seems to be more work that I like to spend on it

 3) I could provide you with a working bootstrap compiler. 
 Unfortunately, I can't make the file publicly available.
 
 If you get a working compiler going, it would be great if you
 could post it on the net as you have done for some other builds.

That is my plan, but I'll have most likely no internet access
shortly for two weeks, so don't hold your breath ...

I will make it available when it is done, but I'll still advice against
using it when it doesn't pass the perl blead tests (where 3.4.6 passes)

 Option 2 isn't that easy.

I'm not even considering that option yet.

 Dave


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread h.m.brand at xs4all dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #8 from H.Merijn Brand h.m.brand at xs4all dot nl 2011-07-15 
15:50:12 UTC ---
On Thu, 14 Jul 2011 20:34:46 +, sje at cup dot hp.com
gcc-bugzi...@gcc.gnu.org wrote:

 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746
 
 Steve Ellcey sje at cup dot hp.com changed:
 
What|Removed |Added
 
  CC||dave.anglin at bell dot
||net, sje at cup dot hp.com
 
 --- Comment #2 from Steve Ellcey sje at cup dot hp.com 2011-07-14 20:34:28 
 UTC ---
 Are you trying to use a 32 bit GCC to bootstrap a 64 bit GCC?  I see you have
 CC set to gcc64 which makes me think that you are using a 64 bit GCC to do the
 bootstrap but you have -mpa-risc-2-0 in CFLAGS, which I think means the 32 bit
 2.0 instruction set and I don't think it should be used for 64 bit builds.
 
 Can you bootstrap if you leave off the -mpa-risc-2-0 flag?

Using the 4.2.4 I had available, I got gcc-4.6.1 installed.

Still doesn't pass perl build:

  CCCMD =  gcc64 -DPERL_CORE -c -mpa-risc-2-0 -DDEBUGGING
-D_HPUX_SOURCE -fno-strict-aliasing -pipe -I/usr/local/pa20_64/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -g -O  -Wall -W -Wextra
-Wdeclaration-after-statement -Wendif-labels -Wc++-compat -Wwrite-strings
{standard input}: Assembler messages:
{standard input}:35254: Error: Invalid operands
make: *** [pp.o] Error 1

Would it help to re-build binutils with gcc-4.6.1?


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread sje at cup dot hp.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #9 from Steve Ellcey sje at cup dot hp.com 2011-07-15 16:03:16 
UTC ---
(In reply to comment #8)

 Using the 4.2.4 I had available, I got gcc-4.6.1 installed.
 
 Still doesn't pass perl build:
 
   CCCMD =  gcc64 -DPERL_CORE -c -mpa-risc-2-0 -DDEBUGGING
 -D_HPUX_SOURCE -fno-strict-aliasing -pipe -I/usr/local/pa20_64/include
 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -g -O  -Wall -W -Wextra
 -Wdeclaration-after-statement -Wendif-labels -Wc++-compat -Wwrite-strings
 {standard input}: Assembler messages:
 {standard input}:35254: Error: Invalid operands
 make: *** [pp.o] Error 1
 
 Would it help to re-build binutils with gcc-4.6.1?

I don't know if rebuilding binutils would help or not.  Can you rerun
the above compile with -save-temps or something so we can see what is on line
35254 of the assembly file?  A preprocessed source file might be helpful too to
see if David or I can reproduce the problem.

Steve Ellcey


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread h.m.brand at xs4all dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #11 from H.Merijn Brand h.m.brand at xs4all dot nl 2011-07-15 
16:09:42 UTC ---
On Fri, 15 Jul 2011 14:41:23 +, dave.anglin at bell dot net
gcc-bugzi...@gcc.gnu.org wrote:

 If you get a working compiler going, it would be great if you could post 
 it on the net as you have done for some other builds.

Not a depot (yet) for 2 reasons

1. No 32bit build available yet to include
2. It doesn't pass the perl build test

(Temporary) available here:
http://ftp.procura.nl/gcc-4.6.1-pa20_64-11.11.tbz

includes binutils-2.21.1 built with gcc-3.4.6/64


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread dave.anglin at bell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #10 from dave.anglin at bell dot net 2011-07-15 16:09:28 UTC ---
On 7/15/2011 11:18 AM, h.m.brand at xs4all dot nl wrote:
 I will make it available when it is done, but I'll still advice against
 using it when it doesn't pass the perl blead tests (where 3.4.6 passes)


One issue may be thread support.  I always configure with 
--enable-threads=posix.

There was an issue with thread detection in gthr-posix.h that caused 
problems for
perl.  It was fixed a few months ago.  This fixed perl for me with the 
32-bit compiler.

Dave


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread dave.anglin at bell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #13 from dave.anglin at bell dot net 2011-07-15 16:18:11 UTC ---
On 7/15/2011 11:51 AM, h.m.brand at xs4all dot nl wrote:
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

 --- Comment #8 from H.Merijn Brandh.m.brand at xs4all dot nl  2011-07-15 
 15:50:12 UTC ---
 On Thu, 14 Jul 2011 20:34:46 +, sje at cup dot hp.com
 gcc-bugzi...@gcc.gnu.org  wrote:

 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

 Steve Ellceysje at cup dot hp.com  changed:

 What|Removed |Added
 
   CC||dave.anglin at bell dot
 ||net, sje at cup dot hp.com

 --- Comment #2 from Steve Ellceysje at cup dot hp.com  2011-07-14 20:34:28 
 UTC ---
 Are you trying to use a 32 bit GCC to bootstrap a 64 bit GCC?  I see you have
 CC set to gcc64 which makes me think that you are using a 64 bit GCC to do 
 the
 bootstrap but you have -mpa-risc-2-0 in CFLAGS, which I think means the 32 
 bit
 2.0 instruction set and I don't think it should be used for 64 bit builds.

 Can you bootstrap if you leave off the -mpa-risc-2-0 flag?
 Using the 4.2.4 I had available, I got gcc-4.6.1 installed.

 Still doesn't pass perl build:

CCCMD =  gcc64 -DPERL_CORE -c -mpa-risc-2-0 -DDEBUGGING
 -D_HPUX_SOURCE -fno-strict-aliasing -pipe -I/usr/local/pa20_64/include
 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -g -O  -Wall -W -Wextra
 -Wdeclaration-after-statement -Wendif-labels -Wc++-compat -Wwrite-strings
 {standard input}: Assembler messages:
 {standard input}:35254: Error: Invalid operands
 make: *** [pp.o] Error 1

This is a separate issue.  It should have its own PR with preprocessed 
source, etc.

 Would it help to re-build binutils with gcc-4.6.1?

There is always a possibility it has been miscompiled.  It might also 
help to run
the GCC testsuite to gain confidence that your new build is working ok.  
It would
also be useful to see that the bootstrap issue is resolved.

Dave


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread h.m.brand at xs4all dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #12 from H.Merijn Brand h.m.brand at xs4all dot nl 2011-07-15 
16:17:40 UTC ---
On Fri, 15 Jul 2011 16:10:35 +, dave.anglin at bell dot net
gcc-bugzi...@gcc.gnu.org wrote:

 One issue may be thread support.  I always configure with 
 --enable-threads=posix.

I don't run with threads enabled. I don't like threaded builds. So if
64bit non-threaded passes, I'm happy. I can (very easily) live without
threads.

 There was an issue with thread detection in gthr-posix.h that caused 
 problems for perl.  It was fixed a few months ago.

Then I should have no problems, because I'm running the build on blead,
not on released perl.

 This fixed perl for me with the 32-bit compiler.
 
 Dave


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread h.m.brand at xs4all dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #14 from H.Merijn Brand h.m.brand at xs4all dot nl 2011-07-15 
16:26:49 UTC ---
On Fri, 15 Jul 2011 16:04:04 +, sje at cup dot hp.com
gcc-bugzi...@gcc.gnu.org wrote:

  Would it help to re-build binutils with gcc-4.6.1?  
 
 I don't know if rebuilding binutils would help or not.  Can you rerun
 the above compile with -save-temps or something so we can see what is on line
 35254 of the assembly file?  A preprocessed source file might be helpful too 
 to
 see if David or I can reproduce the problem.

http://www.xs4all.nl/~prosup/pp.s

 Steve Ellcey


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread h.m.brand at xs4all dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #15 from H.Merijn Brand h.m.brand at xs4all dot nl 2011-07-15 
16:29:50 UTC ---
On Fri, 15 Jul 2011 16:18:57 +, dave.anglin at bell dot net
gcc-bugzi...@gcc.gnu.org wrote:

  Would it help to re-build binutils with gcc-4.6.1?

 There is always a possibility it has been miscompiled.  It might also 
 help to run the GCC testsuite to gain confidence that your new build
 is working ok.  It would also be useful to see that the bootstrap
 issue is resolved.

I cannot run the testsuite:

$ make check
make[1]: Entering directory `/pro/3gl/GNU/gcc/obj-64'
make[2]: Entering directory `/pro/3gl/GNU/gcc/obj-64/fixincludes'
autogen -T ../../src/fixincludes/check.tpl ../../src/fixincludes/inclhack.def
make[2]: autogen: Command not found
make[2]: *** [check] Error 127
make[2]: Leaving directory `/pro/3gl/GNU/gcc/obj-64/fixincludes'
make[1]: *** [check-fixincludes] Error 2
make[1]: Leaving directory `/pro/3gl/GNU/gcc/obj-64'
make: *** [do-check] Error 2

At this point I neither have time nor tuits to build autogen
(I will be without internet for two weeks at any moment from now.
 I work on while I still can)


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread dave.anglin at bell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #16 from dave.anglin at bell dot net 2011-07-15 17:15:17 UTC ---
On 7/15/2011 12:27 PM, h.m.brand at xs4all dot nl wrote:
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

 --- Comment #14 from H.Merijn Brandh.m.brand at xs4all dot nl  2011-07-15 
 16:26:49 UTC ---
 On Fri, 15 Jul 2011 16:04:04 +, sje at cup dot hp.com
 gcc-bugzi...@gcc.gnu.org  wrote:

 Would it help to re-build binutils with gcc-4.6.1?
 I don't know if rebuilding binutils would help or not.  Can you rerun
 the above compile with -save-temps or something so we can see what is on line
 35254 of the assembly file?  A preprocessed source file might be helpful too 
 to
 see if David or I can reproduce the problem.
 http://www.xs4all.nl/~prosup/pp.s
Would you please preprocessed source?  It looks like a code generation bug.

Thanks,
Dave


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread h.m.brand at xs4all dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #17 from H.Merijn Brand h.m.brand at xs4all dot nl 2011-07-15 
17:36:59 UTC ---
On Fri, 15 Jul 2011 17:16:14 +, dave.anglin at bell dot net
gcc-bugzi...@gcc.gnu.org wrote:

  http://www.xs4all.nl/~prosup/pp.s  
 Would you please preprocessed source?  It looks like a code generation bug.

$ make pp.o
`sh  cflags optimize='-g -O' pp.o`  pp.c
  CCCMD =  gcc64 -DPERL_CORE -c -mpa-risc-2-0 -DDEBUGGING
-D_HPUX_SOURCE -fno-strict-aliasing -pipe -I/usr/local/pa20_64/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -save-temps -P  -g -O  -Wall -W
-Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat
-Wwrite-strings
gcc64: warning: -pipe ignored because -save-temps specified
pp.i:1570:0: warning: ignoring #pragma NO_SIDE_EFFECTS fabs [-Wunknown-pragmas]
pp.i:1594:0: warning: ignoring #pragma NO_SIDE_EFFECTS isnan
[-Wunknown-pragmas]
pp.i:1621:0: warning: ignoring #pragma NO_SIDE_EFFECTS copysign
[-Wunknown-pragmas]
pp.i:1622:0: warning: ignoring #pragma NO_SIDE_EFFECTS _Fpclassify
[-Wunknown-pragmas]
pp.i:1623:0: warning: ignoring #pragma NO_SIDE_EFFECTS _Isunordered
[-Wunknown-pragmas]
pp.i:1624:0: warning: ignoring #pragma NO_SIDE_EFFECTS _Signbit
[-Wunknown-pragmas]
pp.i:1625:0: warning: ignoring #pragma NO_SIDE_EFFECTS _Isfinite
[-Wunknown-pragmas]
pp.s: Assembler messages:
pp.s:35254: Error: Invalid operands
make: *** [pp.o] Error 1

 http://www.xs4all.nl/~prosup/pp.i


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread dave.anglin at bell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #18 from dave.anglin at bell dot net 2011-07-15 17:42:45 UTC ---
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

 --- Comment #17 from H.Merijn Brandh.m.brand at xs4all dot nl  2011-07-15 
 17:36:59 UTC ---
 On Fri, 15 Jul 2011 17:16:14 +, dave.anglin at bell dot net
 gcc-bugzi...@gcc.gnu.org  wrote:

 http://www.xs4all.nl/~prosup/pp.s
 Would you please preprocessed source?  It looks like a code generation bug.
 $ make pp.o
 `sh  cflags optimize='-g -O' pp.o`  pp.c
CCCMD =  gcc64 -DPERL_CORE -c -mpa-risc-2-0 -DDEBUGGING
 -D_HPUX_SOURCE -fno-strict-aliasing -pipe -I/usr/local/pa20_64/include
 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -save-temps -P  -g -O  -Wall -W
 -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat
 -Wwrite-strings
 gcc64: warning: -pipe ignored because -save-temps specified
 pp.i:1570:0: warning: ignoring #pragma NO_SIDE_EFFECTS fabs 
 [-Wunknown-pragmas]
 pp.i:1594:0: warning: ignoring #pragma NO_SIDE_EFFECTS isnan
 [-Wunknown-pragmas]
 pp.i:1621:0: warning: ignoring #pragma NO_SIDE_EFFECTS copysign
 [-Wunknown-pragmas]
 pp.i:1622:0: warning: ignoring #pragma NO_SIDE_EFFECTS _Fpclassify
 [-Wunknown-pragmas]
 pp.i:1623:0: warning: ignoring #pragma NO_SIDE_EFFECTS _Isunordered
 [-Wunknown-pragmas]
 pp.i:1624:0: warning: ignoring #pragma NO_SIDE_EFFECTS _Signbit
 [-Wunknown-pragmas]
 pp.i:1625:0: warning: ignoring #pragma NO_SIDE_EFFECTS _Isfinite
 [-Wunknown-pragmas]
 pp.s: Assembler messages:
 pp.s:35254: Error: Invalid operands
 make: *** [pp.o] Error 1

   http://www.xs4all.nl/~prosup/pp.i

Thanks, I see bug.


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread dave.anglin at bell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #19 from dave.anglin at bell dot net 2011-07-15 19:15:06 UTC ---
I think the attached change will fix the bug.

Dave


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread h.m.brand at xs4all dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #20 from H.Merijn Brand h.m.brand at xs4all dot nl 2011-07-16 
03:59:31 UTC ---
On Fri, 15 Jul 2011 19:15:28 +, dave.anglin at bell dot net
gcc-bugzi...@gcc.gnu.org wrote:

 I think the attached change will fix the bug.

Apparently it did! Dave++

I guess this will be in 4.6.2

For 64bit perl:

Test Summary Report
---
re/reg_eval.t   (Wstat: 0
Tests: 7 Failed: 3)
  Failed tests:  4-6
../cpan/CGI/t/tmpdir.t  (Wstat: 0
Tests: 9 Failed: 0)
  TODO passed:   3-9
../dist/IO/t/io_multihomed.t(Wstat: 7424
Tests: 1 Failed: 0)
  Non-zero exit status: 29
  Parse errors: Bad plan.  You planned 8 tests but ran 1.
../dist/IO/t/io_sock.t  (Wstat: 7424
Tests: 1 Failed: 0)
  Non-zero exit status: 29
  Parse errors: Bad plan.  You planned 26 tests but ran 1.
../dist/IO/t/io_udp.t   (Wstat: 9
Tests: 0 Failed: 0)
  Non-zero wait status: 9
  Parse errors: Bad plan.  You planned 7 tests but ran 0.
../dist/Net-Ping/t/450_service.t(Wstat: 7424
Tests: 3 Failed: 0)
  Non-zero exit status: 29
  Parse errors: Bad plan.  You planned 26 tests but ran 3.
../dist/Net-Ping/t/510_ping_udp.t   (Wstat: 65280
Tests: 1 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 2 tests but ran 1.
../ext/Socket/t/Socket.t(Wstat: 7424
Tests: 2 Failed: 0)
  Non-zero exit status: 29
  Parse errors: Bad plan.  You planned 26 tests but ran 2.
Files=2144, Tests=465226, 1241 wallclock secs (272.44 usr 30.32 sys + 1799.09
cusr 204.72 csys = 2306.57 CPU)
Result: FAIL

So gcc-4 still fails the socket stuff


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-15 Thread h.m.brand at xs4all dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #21 from H.Merijn Brand h.m.brand at xs4all dot nl 2011-07-16 
04:05:53 UTC ---
On Sat, 16 Jul 2011 04:00:16 +, h.m.brand at xs4all dot nl
gcc-bugzi...@gcc.gnu.org wrote:

 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746
 
 --- Comment #20 from H.Merijn Brand h.m.brand at xs4all dot nl 2011-07-16 
 03:59:31 UTC ---
 On Fri, 15 Jul 2011 19:15:28 +, dave.anglin at bell dot net
 gcc-bugzi...@gcc.gnu.org wrote:
 
  I think the attached change will fix the bug.
 
 Apparently it did! Dave++

You can re-fetch the (patched) compiler at

http://ftp.procura.nl/gcc-4.6.1-pa20_64-11.11.tbz


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-14 Thread h.m.brand at xs4all dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #1 from H.Merijn Brand h.m.brand at xs4all dot nl 2011-07-14 
11:09:18 UTC ---
FYI I completed building gcc-4.6.1 with

gcc (GCC) 4.2.4
GNU assembler (GNU Binutils) 2.18

gmp-5.0.2
mpfr-3.0.1
mpc-0.8.2

on HP-UX 11.23-ia64 and HP-UX 11.31-ia64 (both IPF/Itanium 2) without too much
trouble
using the generated gcc to build perl from scratch worked out fine for both
32bit (-milp32) and 64bit (-mlp64) configurations.

The gcc builds are now available on my site
http://mirrors.develooper.com/hpux/gcc.html


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-14 Thread sje at cup dot hp.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

Steve Ellcey sje at cup dot hp.com changed:

   What|Removed |Added

 CC||dave.anglin at bell dot
   ||net, sje at cup dot hp.com

--- Comment #2 from Steve Ellcey sje at cup dot hp.com 2011-07-14 20:34:28 
UTC ---
Are you trying to use a 32 bit GCC to bootstrap a 64 bit GCC?  I see you have
CC set to gcc64 which makes me think that you are using a 64 bit GCC to do the
bootstrap but you have -mpa-risc-2-0 in CFLAGS, which I think means the 32 bit
2.0 instruction set and I don't think it should be used for 64 bit builds.

Can you bootstrap if you leave off the -mpa-risc-2-0 flag?


[Bug target/49746] Generated PA-RISC2.0w code cannot be assembled by GNU as-2.21.1

2011-07-14 Thread dave.anglin at bell dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

--- Comment #3 from dave.anglin at bell dot net 2011-07-14 22:06:49 UTC ---
On 7/14/2011 4:35 PM, sje at cup dot hp.com wrote:
 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49746

 --- Comment #2 from Steve Ellceysje at cup dot hp.com  2011-07-14 20:34:28 
 UTC ---
 Are you trying to use a 32 bit GCC to bootstrap a 64 bit GCC?  I see you have
 CC set to gcc64 which makes me think that you are using a 64 bit GCC to do the
 bootstrap but you have -mpa-risc-2-0 in CFLAGS, which I think means the 32 bit
 2.0 instruction set and I don't think it should be used for 64 bit builds.

 Can you bootstrap if you leave off the -mpa-risc-2-0 flag
The flag shouldn't matter.  hppa64 is always PA 2.0.  hppa64 is also 
always PIC, so -fPIC is
also redundant.

The issue is with the bootstrap compiler gcc64.  Is it actually 3.4.6 
(gcc64 -v)?  Did gmp and
mpfr compile and check ok with it?  These need to be 64-bit.

The 64-bit 3.X versions of hppa64 were somewhat buggy and there were 
also some buggy distributions.
If your gcc64 compiled gmp and mpfr ok, I would suggest trying to build 
a early 4.X release, then jump
to 4.6.  This may avoid the out of range field.

I think that you also need a separate 64-bit version of gas.  I'm not 
sure SOM and ELF can be supported
with a single gas binary.  HP uses a wrapper.  I always compiler two 
separate versions of binutils.
GCC on PA-RISC can't easily support both 32 and 64-bit targets because 
of the differences between
SOM and ELF.

This is not a blocker since the bug is in the bootstrap compiler.

If you add -save-temps to the failing compile, this will save the 
assembler output.  This will allow
inspection of the problematic instructions.  I would guess we are 
dealing with a bl or b instruction.
A b,l instruction would have a 21-bit range.

Dave