aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/decl.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2009-10-02 20:16:18 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2009-10-02 20:16:18 +0000
commit5004b2347d2b300302d11dcf95e53e610c6c33aa (patch)
tree40b5d1e4c2dc203a6c690b49915b38af85291282 /gcc/ada/gcc-interface/decl.c
parent1aa8b1dd138a0b4aec3bc5747b7298475335e4d7 (diff)
downloadgcc-5004b2347d2b300302d11dcf95e53e610c6c33aa.zip
gcc-5004b2347d2b300302d11dcf95e53e610c6c33aa.tar.gz
gcc-5004b2347d2b300302d11dcf95e53e610c6c33aa.tar.bz2
decl.c (check_ok_for_atomic): Do nothing if the type doesn't come from source.
* gcc-interface/decl.c (check_ok_for_atomic): Do nothing if the type doesn't come from source. From-SVN: r152418
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r--gcc/ada/gcc-interface/decl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c
index 22ee89e..a6c1672 100644
--- a/gcc/ada/gcc-interface/decl.c
+++ b/gcc/ada/gcc-interface/decl.c
@@ -7868,6 +7868,11 @@ check_ok_for_atomic (tree object, Entity_Id gnat_entity, bool comp_p)
OBJECT is either a type or a decl. */
if (TYPE_P (object))
{
+ /* If this is an anonymous base type, nothing to check. Error will be
+ reported on the source type. */
+ if (!Comes_From_Source (gnat_entity))
+ return;
+
mode = TYPE_MODE (object);
align = TYPE_ALIGN (object);
size = TYPE_SIZE (object);