diff mbox

Turn 1 lra_assert into 1 gcc_assert

Message ID 6282749.fI4dnuqWGJ@polaris
State New
Headers show

Commit Message

Eric Botcazou Oct. 6, 2014, 10:02 a.m. UTC
Hi,

we have run into a case on the ARM where LRA silently generates wrong code in 
release mode, while reload (-mno-lra) would stop with the usual spill failure.

Tested on x86_64-suse-linux, OK for the mainline?


2014-10-06  Eric Botcazou  <ebotcazou@adacore.com>

	* lra-assigns.c (assign_by_spills): Turn lra_assert into gcc_assert.

Comments

Richard Biener Oct. 6, 2014, 11:35 a.m. UTC | #1
On Mon, Oct 6, 2014 at 12:02 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
> we have run into a case on the ARM where LRA silently generates wrong code in
> release mode, while reload (-mno-lra) would stop with the usual spill failure.
>
> Tested on x86_64-suse-linux, OK for the mainline?

The docs on the asm_p flags say there is sth wrong with the asm constraints
so maybe better do

 if (!asm_p)
   error_at (loc, "....");

with an appropriate message and location?

Richard.

>
> 2014-10-06  Eric Botcazou  <ebotcazou@adacore.com>
>
>         * lra-assigns.c (assign_by_spills): Turn lra_assert into gcc_assert.
>
>
> --
> Eric Botcazou
Eric Botcazou Oct. 7, 2014, 7:52 a.m. UTC | #2
> The docs on the asm_p flags say there is sth wrong with the asm constraints
> so maybe better do
> 
>  if (!asm_p)
>    error_at (loc, "....");
> 
> with an appropriate message and location?

OK, I guess I can copy-and-paste reload1.c:spill_failure there.
diff mbox

Patch

Index: lra-assigns.c
===================================================================
--- lra-assigns.c	(revision 215843)
+++ lra-assigns.c	(working copy)
@@ -1332,7 +1332,7 @@  assign_by_spills (void)
 		    }
 		}
 	    }
-	  lra_assert (asm_p);
+	  gcc_assert (asm_p);
 	  break;
 	}
       /* This is a very rare event.  We can not assign a hard register