public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127]
@ 2021-11-29 21:56 Peter Bergner
  2021-11-29 22:56 ` Qing Zhao
  0 siblings, 1 reply; 17+ messages in thread
From: Peter Bergner @ 2021-11-29 21:56 UTC (permalink / raw)
  To: GCC Patches

Sorry for dropping the ball on testing the patch from the bugzilla!

The following patch fixes the ICE reported in the bugzilla on the pre-existing
gcc testsuite test case, bootstraps and shows no testsuite regressions
on powerpc64le-linux.  Ok for trunk?

Peter


For -ftrivial-auto-var-init=*, skip initializing the register variable if it
is an opaque type, because CONST0_RTX(mode) is not defined for opaque modes.

gcc/
	PR middle-end/103127
	* internal-fn.c (expand_DEFERRED_INIT): Skip if VAR_TYPE is opaque.

diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c
index 0cba95411a6..7cc0e9d5293 100644
--- a/gcc/internal-fn.c
+++ b/gcc/internal-fn.c
@@ -3070,6 +3070,10 @@ expand_DEFERRED_INIT (internal_fn, gcall *stmt)
     }
   else
     {
+      /* Skip variables of opaque types that are in a register.  */
+      if (OPAQUE_TYPE_P (var_type))
+	return;
+
       /* If this variable is in a register use expand_assignment.
 	 For boolean scalars force zero-init.  */
       tree init;

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2021-12-01 19:29 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-29 21:56 [PATCH] middle-end: Skip initialization of opaque type register variables [PR103127] Peter Bergner
2021-11-29 22:56 ` Qing Zhao
2021-11-30  8:37   ` Richard Biener
2021-11-30 15:14     ` Peter Bergner
2021-11-30 17:51       ` Qing Zhao
2021-11-30 18:08         ` Peter Bergner
2021-11-30 19:50           ` Qing Zhao
2021-11-30 20:07             ` Peter Bergner
2021-11-30 20:44               ` Qing Zhao
2021-11-30 22:35                 ` Peter Bergner
2021-12-01  9:01                   ` Richard Biener
2021-12-01 15:06                     ` Qing Zhao
2021-12-01 16:08                       ` Peter Bergner
2021-12-01 17:42                     ` Peter Bergner
2021-12-01 19:07                       ` Richard Biener
2021-12-01 19:29                         ` Peter Bergner
2021-11-30 17:59     ` Qing Zhao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).