This patch fixes a bug where GNAT fails to detect an error on an aspect that must be applied to a library-level entity. The following test must give an error: tls.adb:2:26: entity for aspect "Thread_Local_Storage" must be library level entity procedure Tls is V : Natural := 0 with Thread_Local_Storage; begin null; end Tls; Tested on x86_64-pc-linux-gnu, committed on trunk 2015-11-12 Bob Duff * sem_prag.adb (Check_Arg_Is_Library_Level_Local_Name): A pragma that comes from an aspect does not "come from source", so we need to test whether it comes from an aspect.