This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Committed] S/390: Don't ICE in print_operand and print_operand_address


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]