2004-04-09 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Apr 2004 20:08:03 +0000 (20:08 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 9 Apr 2004 20:08:03 +0000 (20:08 +0000)
        * c-common.c (handle_noreturn_attribute): Use TYPE_READONLY instead
        of TREE_READONLY for types.
2004-04-09  Andrew Pinski  <pinskia@physics.uc.edu>

        * gcc.dg/20040409-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80565 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20040409-1.c [new file with mode: 0644]

index abbb5b6..bebfffa 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-09  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       * c-common.c (handle_noreturn_attribute): Use TYPE_READONLY instead
+       of TREE_READONLY for types.
+
 2004-04-09  Caroline Tice  <ctice@apple.com>
 
         * basic-block.h (struct edge_def):  Add new field, crossing_edge.
index a3904ca..9c86829 100644 (file)
@@ -4315,7 +4315,7 @@ handle_noreturn_attribute (tree *node, tree name, tree args ATTRIBUTE_UNUSED,
     TREE_TYPE (*node)
       = build_pointer_type
        (build_type_variant (TREE_TYPE (type),
-                            TREE_READONLY (TREE_TYPE (type)), 1));
+                            TYPE_READONLY (TREE_TYPE (type)), 1));
   else
     {
       warning ("`%s' attribute ignored", IDENTIFIER_POINTER (name));
index 272ad84..1161a0d 100644 (file)
@@ -1,3 +1,7 @@
+2004-04-09  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       * gcc.dg/20040409-1.c: New test.
+
 2004-04-08  Roger Sayle  <roger@eyesopen.com>
 
        PR target/14888
diff --git a/gcc/testsuite/gcc.dg/20040409-1.c b/gcc/testsuite/gcc.dg/20040409-1.c
new file mode 100644 (file)
index 0000000..dc9206a
--- /dev/null
@@ -0,0 +1,4 @@
+/* This tests to make sure that the attribute noreturn 
+   can be used on function pointers. */
+
+int (*temp) (void) __attribute__((noreturn));