when compiled not just to target sparc64 but also to be hosted on sparc64
instead of just sparc, the resulting compiler segfaults most of the time when it
tries to print error messages. For instance, when compiling a file containing
just a bogus preprocessor directive, like so:

#asdfadfa

The problem seems to be that gcc-4.0.1/intl/dcgettext.c:53 can't see a
declaration of libintl_dcgettext, and so the result of the call is cast to an
int, losing its high word, before being returned.  I think
gcc-4.0.1/intl/gettextP.h:213 has caused libgnuintl.h to provide only macros
instead of declarations. Perhaps in libgnuintl.h the various extern libintl_FOO
declarations should be outside of the #ifdef _INTL_REDIRECT_INLINE conditionals,
so that even when using _INTL_REDIRECT_MACROS and not INTL_REDIRECT_INLINE, the
declarations of the libintl_FOO are published to the includer.

Using a handy 32-bit hosted gcc-4.0.1 I had already built, I built using
./configure --enable-languages=c,c++ --with-gnu-as --with-as=BLAH/bin/as
--with-gnu-ld --with-ld=BLAH/bin/ld sparc64-sun-solaris2.9

-- 
           Summary: all error messages produce segfault ICE
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fgccbz0 at greynode dot net
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc64-sun-solaris2.9
  GCC host triplet: sparc64-sun-solaris2.9
GCC target triplet: sparc64-sun-solaris2.9


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

Reply via email to