aboutsummaryrefslogtreecommitdiff
path: root/libiberty/simple-object-elf.c
diff options
context:
space:
mode:
authorHristian Kirtchev <kirtchev@adacore.com>2018-01-11 08:55:52 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-01-11 08:55:52 +0000
commit5efc1c00c88b7758d628ce8e2d1e6d54d5996216 (patch)
treeed4741920d80ba135a51595bea4de21ce8080c44 /libiberty/simple-object-elf.c
parent4dfba737a48b4a3934eabb93a406facfd148afd5 (diff)
downloadgcc-5efc1c00c88b7758d628ce8e2d1e6d54d5996216.zip
gcc-5efc1c00c88b7758d628ce8e2d1e6d54d5996216.tar.gz
gcc-5efc1c00c88b7758d628ce8e2d1e6d54d5996216.tar.bz2
[Ada] Detection of illegal constituent assignments
This patch modifies the analysis of assignment statements to detect an illegal attempt to alter the value of single protected type Part_Of constituent when inside a protected function. 2018-01-11 Hristian Kirtchev <kirtchev@adacore.com> gcc/ada/ * sem_ch5.adb (Analyze_Assignment): Assignments to variables that act as Part_Of consituents of single protected types are illegal when they take place inside a protected function. (Diagnose_Non_Variable_Lhs): Use Within_Function to check for an enclosing function. (Is_Protected_Part_Of_Constituent): New routine. (Within_Function): New routine. gcc/testsuite/ * gnat.dg/protected_func.adb, gnat.dg/protected_func.ads: New testcase. From-SVN: r256520
Diffstat (limited to 'libiberty/simple-object-elf.c')
0 files changed, 0 insertions, 0 deletions