public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/96970] New: -fprofile-arcs compiled binaries are not reproducible
@ 2020-09-08  9:15 rguenth at gcc dot gnu.org
  2020-09-08  9:21 ` [Bug gcov-profile/96970] " pinskia at gcc dot gnu.org
  2020-09-08 11:28 ` gccbmw at lsmod dot de
  0 siblings, 2 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-08  9:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96970

            Bug ID: 96970
           Summary: -fprofile-arcs compiled binaries are not reproducible
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

> cat t.c
int main(){}
> gcc-10 t.c -fprofile-arcs -S
> mv t.s t.sx
> gcc-10 t.c -fprofile-arcs -S
> diff -u t.sx t.s
--- t.sx        2020-09-08 11:13:32.084430676 +0200
+++ t.s 2020-09-08 11:13:33.284444190 +0200
@@ -46,7 +46,7 @@
        .long   1110454826
        .zero   4
        .quad   0
-       .long   1828240311
+       .long   1828579168
        .zero   4
        .quad   .LC0
        .quad   __gcov_merge_add

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gcov-profile/96970] -fprofile-arcs compiled binaries are not reproducible
  2020-09-08  9:15 [Bug gcov-profile/96970] New: -fprofile-arcs compiled binaries are not reproducible rguenth at gcc dot gnu.org
@ 2020-09-08  9:21 ` pinskia at gcc dot gnu.org
  2020-09-08 11:28 ` gccbmw at lsmod dot de
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2020-09-08  9:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96970

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I thought you have to set the seed if you want a reproductable binary in this
case.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug gcov-profile/96970] -fprofile-arcs compiled binaries are not reproducible
  2020-09-08  9:15 [Bug gcov-profile/96970] New: -fprofile-arcs compiled binaries are not reproducible rguenth at gcc dot gnu.org
  2020-09-08  9:21 ` [Bug gcov-profile/96970] " pinskia at gcc dot gnu.org
@ 2020-09-08 11:28 ` gccbmw at lsmod dot de
  1 sibling, 0 replies; 3+ messages in thread
From: gccbmw at lsmod dot de @ 2020-09-08 11:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96970

Bernhard M. Wiedemann <gccbmw at lsmod dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gccbmw at lsmod dot de

--- Comment #2 from Bernhard M. Wiedemann <gccbmw at lsmod dot de> ---
Indeed, -frandom-seed makes it deterministic:

rm -f test1.s*
for i in 1 2 ; do
  gcc-10 -frandom-seed=42 -fprofile-arcs -S test1.c -o test1.s.$i
done
diff -u test1.s.*

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-08 11:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-08  9:15 [Bug gcov-profile/96970] New: -fprofile-arcs compiled binaries are not reproducible rguenth at gcc dot gnu.org
2020-09-08  9:21 ` [Bug gcov-profile/96970] " pinskia at gcc dot gnu.org
2020-09-08 11:28 ` gccbmw at lsmod dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).