aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/function.c8
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 899285c..7e08f78 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2020-04-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/89494
+ * function.c (assign_parm_find_data_types): Add workaround for
+ BROKEN_VALUE_INITIALIZATION compilers.
+
2020-04-16 Richard Biener <rguenther@suse.de>
* gdbhooks.py (TreePrinter): Print SSA_NAME_VERSION of SSA_NAME
diff --git a/gcc/function.c b/gcc/function.c
index d8008f6..d616f5f 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -2414,7 +2414,15 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm,
{
int unsignedp;
+#ifndef BROKEN_VALUE_INITIALIZATION
*data = assign_parm_data_one ();
+#else
+ /* Old versions of GCC used to miscompile the above by only initializing
+ the members with explicit constructors and copying garbage
+ to the other members. */
+ assign_parm_data_one zero_data = {};
+ *data = zero_data;
+#endif
/* NAMED_ARG is a misnomer. We really mean 'non-variadic'. */
if (!cfun->stdarg)