User account creation filtered due to spam.

Bug 11591 - [3.4 only] ICE in gcc.dg/altivec-5.c
Summary: [3.4 only] ICE in gcc.dg/altivec-5.c
Status: RESOLVED FIXED
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
URL:
Keywords: ice-on-valid-code, patch
: 13412 13780 14961 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-07-19 18:06 UTC by dank
Modified: 2004-04-30 17:06 UTC (History)
6 users (show)

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


Attachments

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:
/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?)
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:
/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
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.

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

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.

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

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
	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

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.

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