diff mbox

Fix frv port WRT fallthru

Message ID ede42102-1143-3d3a-b9bf-19b62b516d34@redhat.com
State New
Headers show

Commit Message

Jeff Law Oct. 26, 2016, 4:17 p.m. UTC
We will return garbage from comparison_string in the event of an error 
in an ASM due to unintentional fallthru.  My first through was to have 
output_operand_lossage declared as non-returning, but returning in the 
case of a user ASM is what it's designed to do AFAICT.

So we just avoid the fallthru and return an empty string after issuing 
the error.

Installing on the trunk.

Jeff
commit ff166102929f47c8bffb5aa8699066d9fafa8bb2
Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Wed Oct 26 16:15:38 2016 +0000

    	* config/frv/frv.c (comparison_string): Do not fall through after
    	an error.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241576 138bc75d-0d04-0410-961f-82ee72b054a4
diff mbox

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index afa4562..53d751d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@ 
 2016-10-26  Jeff Law  <law@redhat.com>
 
+	* config/frv/frv.c (comparison_string): Do not fall through after
+	an error.
+
 	* config/iq2000/iq2000.c (iq2000_function_arg): Adjust fallthru
 	comment.
 	(expand_one_builtin): Add missing break.
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 352bcff..50899a7 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -2688,7 +2688,7 @@  comparison_string (enum rtx_code code, rtx op0)
   bool is_nz_p = GET_MODE (op0) == CC_NZmode;
   switch (code)
     {
-    default:  output_operand_lossage ("bad condition code");
+    default:  output_operand_lossage ("bad condition code"); return "";
     case EQ:  return "eq";
     case NE:  return "ne";
     case LT:  return is_nz_p ? "n" : "lt";