aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorMarc Poulhiès <poulhies@adacore.com>2024-02-13 12:20:19 +0100
committerMarc Poulhiès <poulhies@adacore.com>2024-05-16 10:49:30 +0200
commit513f6b889ab5c9fa88e82506cce7534f0400b1c6 (patch)
treeb0d9d84f1b4208aaba94176d39f10b3d36eb5f6b /gcc/tree-vectorizer.h
parentbc35098efbfb14cf17f0f79f5dfcb44fdf0975de (diff)
downloadgcc-513f6b889ab5c9fa88e82506cce7534f0400b1c6.zip
gcc-513f6b889ab5c9fa88e82506cce7534f0400b1c6.tar.gz
gcc-513f6b889ab5c9fa88e82506cce7534f0400b1c6.tar.bz2
ada: Fixup one more pattern of broken scope information
When an array's initialization contains a `others =>` clause with an expression that involves finalization, the resulting scope information is incorrect and can cause crashes with backend (i.e. gnat-llvm) that also use unnesting. The observable symptom is a nested object declaration (created by the compiler) within a loop wrapped in a procedure created by the unnester that has incoherent scope information: its Scope field points to the scope of the procedure (1 level too high) and is contained in the entity chain of some entity nested in the procedure (correct). The correct solution would be to fix the scope information when it is created, but this revealed too large of a task with many interaction with existing code. This change adds another pattern to the Fixup_Inner_Scopes procedure to detect the problematic case and fix the scope, "after the facts". gcc/ada/ * exp_ch7.adb (Unnest_Loop::Fixup_Inner_Scopes): detect a new problematic pattern and fixup the scope accordingly.
Diffstat (limited to 'gcc/tree-vectorizer.h')
0 files changed, 0 insertions, 0 deletions