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]

[treelang] (committed) Fix tree_lang_type_for_mode


 Hi,

  This fixes a segfault in the treelang frontend caused by the recent c99
mulitplication/division patch by rth.  After this patch the treelang frontend
passes all tests again.  I've commited this as obvious since it makes the
frontend work again.

Jim

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/treelang/ChangeLog,v
retrieving revision 1.103
diff -u -p -r1.103 ChangeLog
--- ChangeLog	10 Feb 2005 00:22:24 -0000	1.103
+++ ChangeLog	13 Feb 2005 16:25:36 -0000
@@ -1,3 +1,8 @@
+2005-02-13  James A. Morrison  <phython@gcc.gnu.org>
+
+	* treetree.c (tree_lang_type_for_mode): Return NULL_TREE for all non
+	scalar integer types.
+
 2005-02-09  Richard Henderson  <rth@redhat.com>
 
 	* treetree.c (treelang_init_decl_processing): Call
Index: treetree.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/treelang/treetree.c,v
retrieving revision 1.52
diff -u -p -r1.52 treetree.c
--- treetree.c	10 Feb 2005 00:22:25 -0000	1.52
+++ treetree.c	13 Feb 2005 16:25:36 -0000
@@ -5,7 +5,7 @@
    you are in the right place.
 
    Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
 
    This code is based on toy.c written by Richard Kenner.
 
@@ -893,7 +893,10 @@ tree_lang_type_for_size (unsigned precis
 static tree
 tree_lang_type_for_mode (enum machine_mode mode, int unsignedp)
 {
-  return tree_lang_type_for_size (GET_MODE_BITSIZE (mode), unsignedp);
+  if (SCALAR_INT_MODE_P (mode))
+    return tree_lang_type_for_size (GET_MODE_BITSIZE (mode), unsignedp);
+  else
+    return NULL_TREE;
 }
 
 /* Return the unsigned version of a TYPE_NODE, a scalar type.  */


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