diff options
author | Bob Duff <duff@adacore.com> | 2018-11-14 11:41:36 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-11-14 11:41:36 +0000 |
commit | 1e3c434fa08b0ee0e4f9b5ce803e282d8832a559 (patch) | |
tree | 53c1e8aff76e28c94f53a22b6ebaf2c960a5812c /gcc/gimplify.c | |
parent | 43018f5892ff43551abad3f339bcb55cf74c89cf (diff) | |
download | gcc-1e3c434fa08b0ee0e4f9b5ce803e282d8832a559.zip gcc-1e3c434fa08b0ee0e4f9b5ce803e282d8832a559.tar.gz gcc-1e3c434fa08b0ee0e4f9b5ce803e282d8832a559.tar.bz2 |
[Ada] System'To_Address not always static
System'To_Address is supposed to be static when its parameter is static.
This patch fixes a bug in which it is considered nonstatic when used as
the initial value of a variable with the Thread_Local_Storage aspect, so
the compiler incorrectly gives an error when initializing such a
variable with System'To_Address (0).
2018-11-14 Bob Duff <duff@adacore.com>
gcc/ada/
* sem_attr.adb (To_Address): Simplify setting of
Is_Static_Expression. Remove second (unconditional) call to
Set_Is_Static_Expression -- surely it's not static if the
operand is not. Initialize Static on declaration. Do not try
to fold 'To_Address, even though it's static.
* exp_attr.adb (To_Address): Preserve Is_Static_Expression.
* sinfo.ads, sem_eval.ads, sem_eval.adb (Is_Static_Expression,
Is_OK_Static_Expression, Raises_Constraint_Error): Simplify
documentation. There was too much repetition and redundancy.
From-SVN: r266124
Diffstat (limited to 'gcc/gimplify.c')
0 files changed, 0 insertions, 0 deletions