Remove abort in trans-types.c

Paul Brook paul@codesourcery.com
Thu Sep 2 18:47:00 GMT 2004


I managed to find some code that triped over the abort in gfc_type_for_mode. 
Apparently the correct thing to do if we're passed something unexpected is 
return NULL.

Tested on i686-linux.
Applied to mainline.

2004-08-31  Paul Brook  <paul@codesourcery.com>

 * trans-types.c (gfc_type_for_mode): Return NULL for unknown modes.

Index: trans-types.c
===================================================================
RCS file: /home/gcc/repos/gcc/gcc/gcc/fortran/trans-types.c,v
retrieving revision 1.25
diff -u -p -r1.25 trans-types.c
--- trans-types.c 31 Aug 2004 21:54:24 -0000 1.25
+++ trans-types.c 2 Sep 2004 18:30:00 -0000
@@ -1625,7 +1625,7 @@ gfc_type_for_mode (enum machine_mode mod
       return NULL_TREE;
     }
   else
-    abort ();
+    return NULL_TREE;
 
   for (i = 0; i <= MAX_REAL_KINDS; ++i)
     {



More information about the Gcc-patches mailing list