Bug 24615 - [4.1 Regression] internal compiler error: in print_shift_count_operand, at config/s390/s390.c:4025
Summary: [4.1 Regression] internal compiler error: in print_shift_count_operand, at co...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.1.0
: P3 critical
Target Milestone: 4.1.0
Assignee: Ulrich Weigand
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2005-11-01 15:46 UTC by Richard Biener
Modified: 2005-11-02 23:18 UTC (History)
2 users (show)

See Also:
Host:
Target: s390-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-11-02 16:32:31


Attachments
reduced testcase (1.11 KB, text/plain)
2005-11-01 15:47 UTC, Richard Biener
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2005-11-01 15:46:43 UTC
We ICE during building nss of the mozilla suite.
Comment 1 Richard Biener 2005-11-01 15:47:22 UTC
Created attachment 10099 [details]
reduced testcase

testcase
Comment 2 Richard Biener 2005-11-01 15:56:24 UTC
Regression from 4.0, btw.
Comment 3 Ulrich Weigand 2005-11-01 21:56:40 UTC
What command line options?  I cannot reproduce an ICE with
the usual sets of options ...
Comment 4 Richard Biener 2005-11-01 22:15:15 UTC
Whoops, they're

/usr/lib/gcc/s390-suse-linux/4.1.0/cc1 -fpreprocessed rsawrapr.i -quiet -dumpbase rsawrapr.c -m31 -mesa -march=g5 -ansi -auxbase-strip Linux2.6_s390_glibc_PTH_OPT.OBJ/rsawrapr.o -O2 -Os -Wall -Wall -ansi -version -fmessage-length=0 -fno-strict-aliasing -fPIC -o rsawrapr.s
Comment 5 Ulrich Weigand 2005-11-02 16:32:31 UTC
Confirmed.  Looks like a backend problem, I'm working on it.
Comment 6 Janis Johnson 2005-11-02 22:57:08 UTC
A regression hunt using a cross compiler identified the following patch:
                                                                                
http://gcc.gnu.org/viewcvs?view=rev&rev=101705

2005-07-07  Adrian Straetling  <straetling@de.ibm.com>

	* config/s390/s390-protos.h (s390_expand_clrmem): Delete.
	(s390_expand_setmem): New.
	* config/s390/s390.c: Likewise.
	(print_shift_count_operand): Truncate to 12 bits instead of 6.
	Adapt comments.
	* config/s390/s390.md: ("setmem<mode>"): Accept character as
	general_operand.  Call new function "s390_expand_setmem".
	("clrmem_long", "*clrmem_long"): Rewrite to ...
	("setmem_long", "*setmem_long"): ... this.
                                                                                                              
Only the following options are needed to reproduce the failure with
the reduced testcase:  -m31 -Os -fPIC.
Comment 7 Ulrich Weigand 2005-11-02 23:16:35 UTC
Subject: Bug 24615

Author: uweigand
Date: Wed Nov  2 23:16:31 2005
New Revision: 106405

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=106405
Log:
ChangeLog:

	PR target/24615
	* config/s390/s390-protos.h (s390_decompose_shift_count): Declare.
	* config/s390/s390.c (s390_decompose_shift_count): New function.
	(s390_extra_constraint_str) ['Y']: Use s390_decompose_shift_count.
	(print_shift_count_operand): Use s390_decompose_shift_count.
	* config/s390/predicates.md ("setmem_operand", "shift_count_operand"):
	Use s390_decompose_shift_count.  Do not accept any non-base hard regs.

testsuite/ChangeLog:

	PR target/24615
	* gcc.dg/pr24615.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr24615.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/s390/predicates.md
    trunk/gcc/config/s390/s390-protos.h
    trunk/gcc/config/s390/s390.c
    trunk/gcc/testsuite/ChangeLog

Comment 8 Ulrich Weigand 2005-11-02 23:18:00 UTC
Fixed.