Bug 11591 - [3.4 only] ICE in gcc.dg/altivec-5.c
Summary: [3.4 only] ICE in gcc.dg/altivec-5.c
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.3.1
: P2 normal
Target Milestone: 3.4.1
Assignee: Not yet assigned to anyone
Keywords: ice-on-valid-code, patch
: 13412 13780 14961 (view as bug list)
Depends on:
Reported: 2003-07-19 18:06 UTC by dank
Modified: 2004-04-30 17:06 UTC (History)
6 users (show)

See Also:
Target: powerpc-*-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2003-07-19 21:46:13


Note You need to log in before you can comment on or make changes to this bug.
Description dank 2003-07-19 18:06:17 UTC
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:
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)
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?)
Comment 1 Andrew Pinski 2003-07-19 18:10:15 UTC
Part 2 is false as it is compiled with -maltivec so that was done on purpose.
Comment 2 dank 2003-07-19 19:25:03 UTC
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:
--target=powerpc-750-linux-gnu --host=i686-host_pc-linux-gnu
--with-cpu=750 --disable-nls --enable-threads=posix --enable-symvers=gnu
--enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99
Comment 3 Andrew Pinski 2003-07-19 19:55:03 UTC
No because the support is in gcc, just not enabled by default.
Comment 4 Andrew Pinski 2003-07-19 21:46:13 UTC
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.
Comment 5 Andrew Pinski 2003-07-19 22:31:13 UTC
GCC also ICE on the mainline (20030719).
Comment 6 Andrew Pinski 2003-12-17 18:38:50 UTC
*** Bug 13412 has been marked as a duplicate of this bug. ***
Comment 7 Andrew Pinski 2004-01-26 12:38:57 UTC
*** Bug 13780 has been marked as a duplicate of this bug. ***
Comment 8 Andrew Pinski 2004-03-29 12:00:36 UTC
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-03/msg02245.html>.
Comment 9 CVS Commits 2004-03-30 06:44:00 UTC
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.


Comment 10 CVS Commits 2004-03-30 06:59:41 UTC
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.


Comment 11 andreasmeier80 2004-03-31 10:09:13 UTC
Can this patch go in 3.4.0
Comment 12 Mark Mitchell 2004-03-31 17:27:28 UTC
This can go in 3.4.1 after 3.4.0 is released.
Comment 13 Andrew Pinski 2004-04-14 23:35:42 UTC
*** Bug 14961 has been marked as a duplicate of this bug. ***
Comment 14 CVS Commits 2004-04-30 16:43:54 UTC
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
	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.
	* 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.


Comment 15 Andrew Pinski 2004-04-30 17:06:06 UTC
Fixed in 3.4.1.
Comment 16 CVS Commits 2004-10-29 07:27:17 UTC
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.