It's the note issued by the -Wlto-type-mismatch warning:
q.ads:7:13: warning: type of 'q__proc' does not match original declaration [-
Wlto-type-mismatch]
procedure Proc (A : Arr);
^
q.adb:7:3: note: 'q__proc' was previously declared here
procedure Proc (A : Arr) is begin null; end;
^
q.adb:7:3: note: code may be misoptimized unless -fno-strict-aliasing is used
and it's a bit surprising that -fno-strict-aliasing cannot silence it.
Tested on x86_64-suse-linux, OK for the mainline and 6 branch?
2016-11-13 Eric Botcazou <ebotca...@adacore.com>
lto/
* lto-symtab.c (lto_symtab_merge_decls_2): Only issue note on strict
aliasing if -fstrict-aliasing is enabled.
--
Eric Botcazou
commit 934002ff6d710418af4b7f993f6216e9406d82c2
Author: Eric Botcazou <ebotca...@adacore.com>
Date: Sun Nov 13 11:36:32 2016 +0100
Fix for PB12-008 (disable LTO note on misoptimization with strict aliasing).
diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c
index 94b919b..c8848a5 100644
--- a/gcc/lto/lto-symtab.c
+++ b/gcc/lto/lto-symtab.c
@@ -698,7 +698,7 @@ lto_symtab_merge_decls_2 (symtab_node *first, bool diagnosed_p)
if (diagnosed_p)
inform (DECL_SOURCE_LOCATION (prevailing->decl),
"%qD was previously declared here", prevailing->decl);
- if (tbaa_p)
+ if (tbaa_p && flag_strict_aliasing)
inform (DECL_SOURCE_LOCATION (prevailing->decl),
"code may be misoptimized unless "
"-fno-strict-aliasing is used");