aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/misc.cc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2023-08-23 16:02:21 +0200
committerMarc Poulhiès <poulhies@adacore.com>2023-09-05 13:05:16 +0200
commit4e61fc48f58c16427593ded7fdd0ff49bed897b0 (patch)
tree11c559a54b358cea630303561db7afff27b6203d /gcc/ada/gcc-interface/misc.cc
parente394afd4a584fb4546be3b79270620f79989a387 (diff)
downloadgcc-4e61fc48f58c16427593ded7fdd0ff49bed897b0.zip
gcc-4e61fc48f58c16427593ded7fdd0ff49bed897b0.tar.gz
gcc-4e61fc48f58c16427593ded7fdd0ff49bed897b0.tar.bz2
ada: Add guard before querying the type for its interfaces
Fix crash on illegal code, when routine Iface_Present_In_Ancestor is called on the predefined String type and attempts to examine the list of interfaces. gcc/ada/ * sem_type.adb (Iface_Present_In_Ancestor): Only look at the list of interfaces for types that allow it. The guard is a high-level equivalent of the entity kinds listed in the preconditon of the Interfaces query.
Diffstat (limited to 'gcc/ada/gcc-interface/misc.cc')
0 files changed, 0 insertions, 0 deletions