public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5158] tree-optimization/103190 - fix assert in reassoc stmt placement with asm
@ 2021-11-11 15:06 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2021-11-11 15:06 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:fac4c4bdab1735bd8a87e37c519f0260e4769f2a
commit r12-5158-gfac4c4bdab1735bd8a87e37c519f0260e4769f2a
Author: Richard Biener <rguenther@suse.de>
Date: Thu Nov 11 15:12:32 2021 +0100
tree-optimization/103190 - fix assert in reassoc stmt placement with asm
This makes sure to only assert we don't run into a asm goto when
inserting a stmt in reassoc, matching the condition in
can_reassociate_p. We can handle EH edges from an asm just like
EH edges from any other stmt.
2021-11-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/103190
* tree-ssa-reassoc.c (insert_stmt_after): Only assert on asm goto.
Diff:
---
gcc/tree-ssa-reassoc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 6a555e7c553..65316223047 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -1515,7 +1515,8 @@ insert_stmt_after (gimple *stmt, gimple *insert_point)
gsi_insert_after (&gsi, stmt, GSI_NEW_STMT);
return;
}
- else if (gimple_code (insert_point) == GIMPLE_ASM)
+ else if (gimple_code (insert_point) == GIMPLE_ASM
+ && gimple_asm_nlabels (as_a <gasm *> (insert_point)) != 0)
/* We have no idea where to insert - it depends on where the
uses will be placed. */
gcc_unreachable ();
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-11 15:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11 15:06 [gcc r12-5158] tree-optimization/103190 - fix assert in reassoc stmt placement with asm Richard Biener
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).