empty TREE_PURPOSE. Fixes PR c/4294.
testsuite:
* gcc.c-torture/compile/
20010911-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45541
138bc75d-0d04-0410-961f-
82ee72b054a4
+2001-09-11 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * c-common.c (split_specs_attrs): Allow for empty attributes with
+ empty TREE_PURPOSE. Fixes PR c/4294.
+
Tue Sep 11 11:37:52 CEST 2001 Jan Hubicka <jh@suse.cz>
* basic-block.h (cached_make_edge, make_single_succ): New.
s = t;
}
}
- else
+ /* The TREE_PURPOSE may also be empty in the case of
+ __attribute__(()). */
+ else if (TREE_PURPOSE (t) != NULL_TREE)
{
if (attrs == NULL_TREE)
attrs = a = TREE_PURPOSE (t);
+2001-09-11 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * gcc.c-torture/compile/20010911-1.c: New test.
+
2001-09-10 Janis Johnson <janis187@us.ibm.com>
* lib/profopt.exp: New, to support profile-directed optimizations.
--- /dev/null
+/* Test for segfault handling an empty attribute. */
+/* Origin: PR c/4294 from <tori@ringstrom.mine.nu>. */
+
+void __attribute__(()) foo();