aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index c5318b9..b87e48d 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -2379,10 +2379,14 @@ find_taken_edge_computed_goto (basic_block bb, tree val)
dest = label_to_block (val);
if (dest)
- {
- e = find_edge (bb, dest);
- gcc_assert (e != NULL);
- }
+ e = find_edge (bb, dest);
+
+ /* It's possible for find_edge to return NULL here on invalid code
+ that abuses the labels-as-values extension (e.g. code that attempts to
+ jump *between* functions via stored labels-as-values; PR 84136).
+ If so, then we simply return that NULL for the edge.
+ We don't currently have a way of detecting such invalid code, so we
+ can't assert that it was the case when a NULL edge occurs here. */
return e;
}