This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Remove abort in trans-types.c
- From: Paul Brook <paul at codesourcery dot com>
- To: fortran at gcc dot gnu dot org
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 2 Sep 2004 19:45:03 +0100
- Subject: Remove abort in trans-types.c
- Organization: CodeSourcery
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)
{