https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120440
--- Comment #19 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Sam James from comment #18)
> Created attachment 62018 [details]
> a-except.adb
>
> (In reply to Sam James from comment #17)
> Well, I say that, but at least it should be reproducible in terms of seeing
> the dodgy difference with:
>
> $ gcc -c -O1 -march=x86-64-v2 -W -Wall -fno-PIE -gnatpg -gnata -g
> -fno-inline -fno-toplevel-reorder a-except.adb -o a-except.o
>
> vs
>
> $ gcc -c -O1 -march=x86-64-v3 -W -Wall -fno-PIE -gnatpg -gnata -g
> -fno-inline -fno-toplevel-reorder a-except.adb -o a-except.o
Looking at the dumps:
--- a/a-except.adb.006t.original
+++ b/a-except.adb.006t.original
@@ -782,7 +782,7 @@ void
ada.exceptions.exception_propagation.gnat_gcc_exception_cleanup (system__ex
struct system__exceptions__machine__gnat_gcc_exception * {ref-all} copy =
excep;
if (copy != 0B)
{
- .gnat_free (copy);
+ .gnat_free (*((void * *) copy + 18446744073709551608));
copy = 0B;
}
else
?!