ASM_OUTPUT_ALIGN aborts on HP 9000/43S (unnecessarily?)
Dietmar Schindler
schd@mra.man.de
Wed Dec 29 04:25:00 GMT 1999
GCC version 2.95.2
host m68k-hp-hpux9.03
Dear GCC maintainers,
when I on our HP 9000/43S
make LANGUAGES=c
it fails with
for name in _eh; \
do \
echo ${name}; \
/res4/unix/gcc-2.95.2/gcc/xgcc -B/res4/unix/gcc-2.95.2/gcc/
-B/usr/local/m68k-hp-hpux9.03/bin/ -I/usr/local/m68k-hp-hpux9.03/include
-O2 -DIN_GCC -g -I./include -g1 -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -fexceptions -I. -I. -I./config
-I./../include -c \
-DL${name} ./libgcc2.c -o ${name}.o; \
if [ $? -eq 0 ] ; then true; else exit 1; fi; \
ar rc tmplibgcc2.a ${name}.o; \
rm -f ${name}.o; \
done
_eh
cc1: warning: `-g' not supported by this configuration of GCC
cc1: warning: `-g1' not supported by this configuration of GCC
./libgcc2.c:4015: Internal compiler error at dwarf2out.c:1727
make[1]: *** [libgcc2.a] Error 1
make[1]: Leaving directory `/res4/unix/gcc-2.95.2/gcc'
make: *** [all-gcc] Error 2
This is because dwarf2out.c:1727 reads
ASM_OUTPUT_ALIGN (asm_out_file, floor_log2 (PTR_SIZE));
which expands to
if (( floor_log2_wide ((unsigned int) ((32 / 8)))) ==
1) fprintf (asm_out_file, "\tlalign 2\n");
else if (( floor_log2_wide ((unsigned int) ((32 / 8)))) !=
0) fatal ("Internal compiler error at
%s:%d\n", trim_filename ("dwarf2out.c"), 1727);;
according to the macro definition in "gcc/config/m68k/hp320.h"
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
if ((LOG) == 1) \
fprintf (FILE, "\tlalign 2\n"); \
else if ((LOG) != 0) \
abort ();
It appears to me that this is a case where too much error checking does
more harm than too little, since the HP-UX assembler is well capable of
the alignment value of 4. So I suggest to change the macro simply to
#define ASM_OUTPUT_ALIGN(FILE, LOG) fprintf(FILE, "\tlalign %d\n",
1<<(LOG))
Regards,
Dietmar Schindler
More information about the Gcc-bugs
mailing list