GCC 4.2 (but I think not the latest tip of GCC 4.2 branch) has broken value
initialization, see PR33916. The following patch provides a workaround for
that. Tested with GCC 4.2 on a reduced testcase I've distilled from the
assign_param_data_one class which has been miscompiled the same.
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 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
{
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)