This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Committed] S/390: Don't ICE in print_operand and print_operand_address
- From: Richard Henderson <rth at redhat dot com>
- To: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 26 Nov 2010 11:18:28 -0800
- Subject: Re: [Committed] S/390: Don't ICE in print_operand and print_operand_address
- References: <20101126140859.GA6030@bart>
On 11/26/2010 06:08 AM, Andreas Krebbel wrote:
> Hi,
>
> the attached patch replaces several assertions and fatal_insn calls
> with error printing statements when printing operands. This avoids
> ICEs to be issued when inline asm hackers use wrong operands or output
> modifiers.
>
> Committed to mainline.
>
> Bye,
>
> -Andreas-
>
>
> 2010-11-26 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
>
> * config/s390/s390.c (print_operand_address): Replace assert with
> error message.
> (print_operand): Replace assertions, gcc_unreachable and
> fatal_insn with error messages.
>
>
> Index: gcc/config/s390/s390.c
> ===================================================================
> *** gcc/config/s390/s390.c.orig
> --- gcc/config/s390/s390.c
> *************** print_operand_address (FILE *file, rtx a
> *** 5130,5136 ****
>
> if (s390_symref_operand_p (addr, NULL, NULL))
> {
> ! gcc_assert (TARGET_Z10);
> output_addr_const (file, addr);
> return;
> }
> --- 5130,5140 ----
>
> if (s390_symref_operand_p (addr, NULL, NULL))
> {
> ! if (!TARGET_Z10)
> ! {
> ! error ("symbolic memory references are only supported on z10 or later");
These should be using output_operand_lossage, which generates an an error
if these are triggered from an asm, and an ICE otherwise.
r~