Bug 16503 - ICE during make -C gcc gnatlib
Summary: ICE during make -C gcc gnatlib
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.4.2
: P2 normal
Target Milestone: 3.4.3
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks: 16986
  Show dependency treegraph
 
Reported: 2004-07-12 21:34 UTC by Pawel Sikora
Modified: 2004-11-14 11:57 UTC (History)
4 users (show)

See Also:
Host: sparc-pld-linux
Target: sparc64-pld-linux
Build: sparc-pld-linux
Known to work:
Known to fail:
Last reconfirmed: 2004-07-16 09:05:12


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Sikora 2004-07-12 21:34:47 UTC
+===========================GNAT BUG DETECTED==============================+ 
| 3.4.2 20040709 (prerelease) (sparc64-pld-linux-gnu) GCC error:           | 
| in delete_insn, at cfgrtl.c:146                                          | 
| Error detected at a-ngcefu.adb:379:14 [a-nscefu.ads:19:1]                | 
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            | 
| Include the entire contents of this bug box in the report.               | 
| Include the exact gcc or gnatmake command that you entered.              | 
| Also include sources listed below in gnatchop format                     | 
| (concatenated together with no headers between files).                   | 
+==========================================================================+ 
 
# gcc -v 
Reading specs from /usr/lib/gcc/sparc-pld-linux/3.4.2/specs 
Configured with: ../configure --prefix=/usr --libdir=/usr/lib 
--libexecdir=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man 
--enable-shared --enable-threads=posix --enable-__cxa_atexit 
--enable-languages=c,c++,f77,objc,ada,java --enable-c99 --enable-long-long 
--enable-multilib --enable-nls --with-gnu-as --with-gnu-ld --with-system-zlib 
--with-slibdir=/lib --without-x sparc-pld-linux 
Thread model: posix 
gcc version 3.4.2 20040709 (prerelease) (PLD Linux)
Comment 1 Arnaud Charlet 2004-07-13 19:37:06 UTC
The bug box is pointing to a GCC error, so recategorizing.

Arno
Comment 2 Pawel Sikora 2004-07-14 09:12:09 UTC
ps). 
 
[ -f /home/users/pluto/rpm/BUILD/gcc-3.4-20040709/obj-sparc64-pld-linux/gcc/../binutils/ar ] ;  
then  
echo /home/users/pluto/rpm/BUILD/gcc-3.4-20040709/obj-sparc64-pld-linux/gcc/../binutils/ar ;  
else if [ "sparc64-unknown-linux-gnu" = "sparc64-pld-linux-gnu" ] ; then echo  
ar; else t='s,^,sparc64-pld-linux-,;'; echo ar | sed -e  ; fi; fi` 
                                                         
                                                       ^^ 
(...) 
sed: option requires an argument -- e 
Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]... 
 
Comment 3 Pawel Sikora 2004-07-14 16:39:45 UTC
(In reply to comment #2) 
> ps).  
>   
> 
[ -f /home/users/pluto/rpm/BUILD/gcc-3.4-20040709/obj-sparc64-pld-linux/gcc/../binutils/ar ] ;   
> then   
> 
echo /home/users/pluto/rpm/BUILD/gcc-3.4-20040709/obj-sparc64-pld-linux/gcc/../binutils/ar ;   
> else if [ "sparc64-unknown-linux-gnu" = "sparc64-pld-linux-gnu" ] ; then 
echo   
> ar; else t='s,^,sparc64-pld-linux-,;'; echo ar | sed -e  ; fi; fi`  
>                                                           
>                                                        ^^  
> (...)  
> sed: option requires an argument -- e  
> Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]...  
>   
 
# fix. 
 
--- gcc-3.4-20040709/gcc/Makefile.in.orig       2004-07-14 18:31:01.000000000 
+0200 
+++ gcc-3.4-20040709/gcc/Makefile.in    2004-07-14 18:36:13.000000000 +0200 
@@ -304,7 +304,7 @@ 
     if [ "$(host)" = "$(target)" ] ; then \ 
       echo ar; \ 
     else \ 
-       t='$(program_transform_name)'; echo ar | sed -e $$t ; \ 
+       $(shell echo ar|sed $(program_transform_name)); \ 
     fi; \ 
   fi` 
 AR_FLAGS_FOR_TARGET = 
@@ -317,7 +317,7 @@ 
     if [ "$(host)" = "$(target)" ] ; then \ 
       echo $(RANLIB); \ 
     else \ 
-       t='$(program_transform_name)'; echo ranlib | sed -e $$t ; \ 
+       $(shell echo ar|sed $(program_transform_name)); \ 
     fi; \ 
   fi` 
 NM_FOR_TARGET = ` \ 
@@ -329,7 +329,7 @@ 
     if [ "$(host)" = "$(target)" ] ; then \ 
       echo nm; \ 
     else \ 
-       t='$(program_transform_name)'; echo nm | sed -e $$t ; \ 
+       $(shell echo ar|sed $(program_transform_name)); \ 
     fi; \ 
   fi` 
 
 
 
Comment 4 Andrew Pinski 2004-07-14 16:44:16 UTC
First your fix is not really right:
-       t='$(program_transform_name)'; echo nm | sed -e $$t ; \ 
+       $(shell echo ar|sed $(program_transform_name)); \ 

but another is that $$t should be expanded to the $(program_transform_name) and should work 
correctly.

So what shell and what make are you using?
Comment 5 Pawel Sikora 2004-07-14 16:51:22 UTC
(In reply to comment #4) 
> First your fix is not really right: 
> -       t='$(program_transform_name)'; echo nm | sed -e $$t ; \  
> +       $(shell echo ar|sed $(program_transform_name)); \  
>  
> but another is that $$t should be expanded to the $(program_transform_name) 
and should work  
> correctly. 
>  
> So what shell and what make are you using? 
 
bash2.05b@ix86, tcsh-6.12.00@sparc64 and make-3.80. 
 
Comment 6 Andrew Pinski 2004-07-16 09:23:25 UTC
Actually your make file problem does not make sense as the make file is right.
t='$(program_transform_name)'; echo ar | sed -e $$t ;
sets t to be the variable and then translate it in the shell.
And this works for anyone else I know of and works for me too and this has been this way since 1999.
Comment 7 Pawel Sikora 2004-07-16 10:40:51 UTC
(In reply to comment #6)   
> Actually your make file problem does not make sense as the make file is   
right.   
> t='$(program_transform_name)'; echo ar | sed -e $$t ;   
> sets t to be the variable and then translate it in the shell.   
> And this works for anyone else I know of and works for me too and this has   
been this way since 1999.   
   
Do You want to see a buildlog?   
`t='$(program_transform_name)'; echo ar | sed -e $$t ;' doesn't work   
at my  (In reply to comment #6)  
> Actually your make file problem does not make sense as the make file is  
right.  
> t='$(program_transform_name)'; echo ar | sed -e $$t ;  
> sets t to be the variable and then translate it in the shell.  
> And this works for anyone else I know of and works for me too and this has  
been this way since 1999.  
  
hmm, You have a right. I've tested it with bash/tcsh/pdksh at ix86/sparc  
and it works. This is probably a bug in internal RPM shell... 
  
Comment 8 Pawel Sikora 2004-07-16 19:00:39 UTC
(In reply to comment #6) 
> Actually your make file problem does not make sense as the make file is 
right. 
> t='$(program_transform_name)'; echo ar | sed -e $$t ; 
> sets t to be the variable and then translate it in the shell. 
> And this works for anyone else I know of and works for me too and this has 
been this way since 1999. 
 
http://gcc.gnu.org/ml/gcc-help/2004-07/msg00147.html 
now we have two reports ;) 
Comment 9 Chris Hamilton 2004-07-21 02:31:56 UTC
I am having *exactly* the same problem trying to build a i686-pc-linux hosted 
cross compiler for the sparc64-elf target.  I'm building from the 3.4.1 
release.  I'd be happy to give additional info, or supply build logs, or 
whatever.

Does Pawe's patch fix the problem (even if only for sparc64-elf)?
Comment 10 Pawel Sikora 2004-07-21 07:29:50 UTC
(In reply to comment #9) 
> I am having *exactly* the same problem trying to build a i686-pc-linux 
hosted  
> cross compiler for the sparc64-elf target.  I'm building from the 3.4.1  
> release.  I'd be happy to give additional info, or supply build logs, or  
> whatever. 
>  
> Does Pawe's patch fix the problem (even if only for sparc64-elf)? 
 
A symlink to crosssparc64-binutils helps. 
 
# rm -rf obj-sparc64-pld-linux && install -d obj-sparc64-pld-linux 
# cd obj-sparc64-pld-linux 
# ln -sf /usr/sparc64-pld-linux/bin binutils 
# ../configure (...) 
 
Comment 11 Andrew Pinski 2004-09-22 12:24:32 UTC
*** Bug 17601 has been marked as a duplicate of this bug. ***
Comment 12 Eric Botcazou 2004-10-01 14:59:56 UTC
Given that PR rtl-optimization/16986 seems to be gone, could you try with a
recent 3.4.3pre compiler?
Comment 13 Ralf Corsepius 2004-10-04 03:32:43 UTC
(In reply to comment #11, #12)
> *** Bug 17601 has been marked as a duplicate of this bug. ***

I am a bit confused about you marking PR 17601 as duplicate of this PR.
PR 17601 is about a Makefile not working as desired (be it a Makefile bug, be it
a bug in bash; I don't know), not about an ICE nor do I see that 17601 is
related to 
PR 16986.
Comment 14 Andrew Pinski 2004-10-04 03:39:13 UTC
Ok, the makefile problem is listed as PR 17601, I made the mistake as I thought this was only a bug for 
the make file problem.
Comment 15 Eric Botcazou 2004-11-14 11:57:36 UTC
I've built a sparc-sun-solaris2.8 x sparc64-sun-solaris2.8 Ada cross-compiler
with GCC 3.4.3 so closing as presumably fixed.