I built and tested gcc-ss-3_3-20030714 using http://kegel.com/crosstool for two powerpc CPUs that lack altivec support, ppc405 and ppc750. They both had the following failure in 'make check-gcc': FAIL: gcc.dg/altivec-5.c (test for excess errors) Excess errors: /crosstool-0.13/build/powerpc-750-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/gcc-ss-3_3-20030714/gcc/testsuite/gcc.dg/altivec-5.c:12: error: unrecognizable insn: (insn:HI 5 18 6 0 (nil) (set (reg/v:V4SI 120) (mem/f:V4SI (plus:SI (reg/f:SI 67 ap) (const_int 8 [0x8])) [4 b+0 S16 A128])) -1 (nil) (nil)) /crosstool-0.13/build/powerpc-750-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/gcc-ss-3_3-20030714/gcc/testsuite/gcc.dg/altivec-5.c:12: internal compiler error: in extract_insn, at recog.c:2175 Seems like there are two problems here: 1. the compiler shouldn't ICE 2. the test case should't be compiled for targets that don't have altivec in the triplet (or was that done on purpose?)
Part 2 is false as it is compiled with -maltivec so that was done on purpose.
So when gcc is run with -maltivec, and gcc was configured for a CPU which doesn't support altivec, should the compiler gracefully exit with an error "This compiler was not built with support for altivec" ? FWIW, I configured gcc with: /crosstool-0.13/build/powerpc-750-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5/gcc-ss-3_3-20030714/configure --target=powerpc-750-linux-gnu --host=i686-host_pc-linux-gnu --prefix=/opt/cegl-2.0/powerpc-750-linux-gnu/gcc-ss-3_3-20030714-glibc-2.2.5 --with-cpu=750 --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long
No because the support is in gcc, just not enabled by default.
I can confirm this ICEs in 3.3.1 (20030714) with -mabi=altivec, it does not ICE so something so wrong when it comes to alignment, I think.
GCC also ICE on the mainline (20030719).
*** Bug 13412 has been marked as a duplicate of this bug. ***
*** Bug 13780 has been marked as a duplicate of this bug. ***
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-03/msg02245.html>.
Subject: Bug 11591 CVSROOT: /cvs/gcc Module name: gcc Changes by: hpenner@gcc.gnu.org 2004-03-30 06:43:52 Modified files: gcc : ChangeLog gcc/config/rs6000: rs6000.c Log message: PR 11591 * config/rs6000/rs6000.c (rs6000_legitimate_address): Allow any offset to argument pointer in no-strict case. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3310&r2=2.3311 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.c.diff?cvsroot=gcc&r1=1.616&r2=1.617
Subject: Bug 11591 CVSROOT: /cvs/gcc Module name: gcc Branch: hammer-3_3-branch Changes by: hpenner@gcc.gnu.org 2004-03-30 06:59:38 Modified files: gcc : ChangeLog.hammer gcc/config/rs6000: rs6000.c Log message: Backport from mainline: PR 11591 * config/rs6000/rs6000.c (rs6000_legitimate_address): Allow any offset to argument pointer in no-strict case. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.hammer.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.1.2.380&r2=1.1.2.381 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.c.diff?cvsroot=gcc&only_with_tag=hammer-3_3-branch&r1=1.397.2.33&r2=1.397.2.34
Can this patch go in 3.4.0
This can go in 3.4.1 after 3.4.0 is released.
*** Bug 14961 has been marked as a duplicate of this bug. ***
Subject: Bug 11591 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: dje@gcc.gnu.org 2004-04-30 16:43:50 Modified files: gcc : ChangeLog gcc/doc : install.texi invoke.texi gcc/config/rs6000: rs6000.c rs6000.h rs6000.md Added files: gcc/config/rs6000: power5.md Log message: 2004-04-19 David Edelsohn <edelsohn@gnu.org> * doc/install.texi (*-ibm-aix*): Add AIX 5.1 assembler and archiver fix information. 2004-04-17 Alan Modra <amodra@bigpond.net.au> PR target/14715 * config/rs6000/rs6000.c (rs6000_stack_info): Make parm_size agree with STARTING_FRAME_OFFSET. 2004-04-07 David Edelsohn <edelsohn@gnu.org> * config/rs6000/rs6000.c (processor_target_table): Add MASK_MFCRF to power4 and power5 entries. 2004-04-05 David Edelsohn * config/rs6000/rs6000.c (VTABLE_NAME_P): Add _ZTI to special symbol handling. 2004-03-30 Hartmut Penner <hpenner@de.ibm.com> PR 11591 * config/rs6000/rs6000.c (rs6000_legitimate_address): Allow any offset to argument pointer in no-strict case. 2004-03-25 David Edelsohn <edelsohn@gnu.org> * config/rs6000/rs6000.c (rs6000_always_hint): New variable. (rs6000_sched_groups): New variable. (processor_target_table): Add power5. (rs6000_override_options): Set rs6000_sched_insert_nops, rs6000_sched_costly_dep and rs6000_sched_restricted_insns_priority from rs6000_sched_groups. (output_cbranch): Use rs6000_always_hint. (rs6000_variable_issue): Use rs6000_sched_groups. (rs6000_adjust_cost): Add CPU_POWER5. (is_microcoded_insn): Use rs6000_sched_groups. (is_dispatch_slot_restricted): Use rs6000_sched_groups. Return 2 for POWER5 cracked instructions. (is_cracked_insn): Use rs6000_sched_groups. (is_branch_slot_insn): Use rs6000_sched_groups. (rs6000_issue_rate): Add CPU_POWER5. (rs6000_sched_finish): Use rs6000_sched_groups. (rs6000_rtx_costs): Add PROCESSOR_POWER5. * config/rs6000/rs6000.h (processor_type): Add PROCESSOR_POWER5. (DEFAULT_SCHED_COSTLY_DEP): Delete. (DEFAULT_RESTRICTED_INSNS_PRIORITY): Delete. (DEFAULT_SCHED_FINISH_NOP_INSERTION_SCHEME): Delete. * config/rs6000/rs6000.md (define_attr "cpu"): Add power5. * config/rs6000/power5.md: New file. * doc/invoke.texi: Add power5 option. 2004-03-17 Fariborz Jahanian <fjahanian@apple.com> * config/rs6000/rs6000.c (rs6000_stack_info): correct reg_size for mixed mode. (rs6000_emit_prologue): Ditto. (rs6000_emit_epilogue): Ditto. * config/rs6000/rs6000.h: Definition of DWARF_CIE_DATA_ALIGNMENT macro for mixed mode. 2004-03-04 David Edelsohn <edelsohn@gnu.org> GP <gp@qnx.com> * config/rs6000/rs6000.c (output_function_profiler): Append @plt when compiling PIC. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.426&r2=2.2326.2.427 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/install.texi.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.248.4.17&r2=1.248.4.18 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/doc/invoke.texi.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.390.2.26&r2=1.390.2.27 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/power5.md.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.18.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.576.2.16&r2=1.576.2.17 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.306.4.3&r2=1.306.4.4 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.md.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.284.4.9&r2=1.284.4.10
Fixed in 3.4.1.
Subject: Bug 11591 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_2-rhl8-branch Changes by: jakub@gcc.gnu.org 2004-10-29 07:27:05 Modified files: gcc : ChangeLog gcc/config/rs6000: rs6000.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.dg: altivec-5.c Log message: 2004-03-30 Hartmut Penner <hpenner@de.ibm.com> PR 11591 * config/rs6000/rs6000.c (rs6000_legitimate_address): Allow any offset to argument pointer in no-strict case. 2002-04-16 Jakub Jelinek <jakub@redhat.com> * gcc.dg/altivec-5.c: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.13152.2.657.2.27.2.205&r2=1.13152.2.657.2.27.2.206 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.291.2.13.2.5.2.21&r2=1.291.2.13.2.5.2.22 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=1.1672.2.166.2.8.2.87&r2=1.1672.2.166.2.8.2.88 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/altivec-5.c.diff?cvsroot=gcc&only_with_tag=gcc-3_2-rhl8-branch&r1=NONE&r2=1.2.28.1