aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-03-18 00:00:04 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2016-03-18 00:00:04 +0100
commitfcc2b74fde7ce906d9ef9d97436d826cb8d550c3 (patch)
treeb831108f83e028084d2e68c483d3e5ba8c73c3ad /gcc/c
parent1b858e76385c2bf5ac39c1dc6bfee316d6f422a5 (diff)
downloadgcc-fcc2b74fde7ce906d9ef9d97436d826cb8d550c3.zip
gcc-fcc2b74fde7ce906d9ef9d97436d826cb8d550c3.tar.gz
gcc-fcc2b74fde7ce906d9ef9d97436d826cb8d550c3.tar.bz2
re PR middle-end/70280 (-fcompare-debug failure (length) with --param=integer-share-limit=4016 -mavx512bw)
PR c/70280 * c-typeck.c (composite_type): Don't count void_list_node into len, if the list is terminated by void_list_node, start with void_list_node instead of NULL for newargs. Stop at void_list_node. From-SVN: r234312
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog8
-rw-r--r--gcc/c/c-typeck.c8
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index fa657e5..3d57c76c 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,11 @@
+2016-03-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/70280
+ * c-typeck.c (composite_type): Don't count void_list_node
+ into len, if the list is terminated by void_list_node, start
+ with void_list_node instead of NULL for newargs. Stop
+ at void_list_node.
+
2016-03-16 Marek Polacek <polacek@redhat.com>
PR c/70093
diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index de9d465..fb274d5 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -518,15 +518,17 @@ composite_type (tree t1, tree t2)
/* If both args specify argument types, we must merge the two
lists, argument by argument. */
- len = list_length (p1);
- newargs = 0;
+ for (len = 0, newargs = p1;
+ newargs && newargs != void_list_node;
+ len++, newargs = TREE_CHAIN (newargs))
+ ;
for (i = 0; i < len; i++)
newargs = tree_cons (NULL_TREE, NULL_TREE, newargs);
n = newargs;
- for (; p1;
+ for (; p1 && p1 != void_list_node;
p1 = TREE_CHAIN (p1), p2 = TREE_CHAIN (p2), n = TREE_CHAIN (n))
{
/* A null type means arg type is not specified.