aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorWaldek Hebisch <hebisch@math.uni.wroc.pl>2003-12-15 15:45:51 +0100
committerAndreas Jaeger <aj@gcc.gnu.org>2003-12-15 15:45:51 +0100
commite8423af96d93b8577306598b1fba01cabc4f7622 (patch)
tree506031f1137f927304804a05247827678d41b643 /gcc/tree.c
parent374caa503bcf9605a85f8b68c79ca2d918c96fb0 (diff)
downloadgcc-e8423af96d93b8577306598b1fba01cabc4f7622.zip
gcc-e8423af96d93b8577306598b1fba01cabc4f7622.tar.gz
gcc-e8423af96d93b8577306598b1fba01cabc4f7622.tar.bz2
tree.c (initializer_zerop): Add test for empty set.
2003-12-15 Waldek Hebisch <hebisch@math.uni.wroc.pl> * tree.c (initializer_zerop): Add test for empty set. * integrate.c (function_cannot_inline_p): Forbid inlining functions calling `longjmp'. From-SVN: r74633
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 8466990..52faeaf 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -5011,6 +5011,11 @@ initializer_zerop (tree init)
&& ! REAL_VALUE_MINUS_ZERO (TREE_REAL_CST (TREE_IMAGPART (init))));
case CONSTRUCTOR:
{
+ /* Set is empty if it has no elements. */
+ if ((TREE_CODE (TREE_TYPE (init)) == SET_TYPE)
+ && CONSTRUCTOR_ELTS (init))
+ return false;
+
if (AGGREGATE_TYPE_P (TREE_TYPE (init)))
{
tree aggr_init = CONSTRUCTOR_ELTS (init);