public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/99579] New: gmon.out not created with -O0 but otherwise is @ 2021-03-13 16:49 wsnyder at wsnyder dot org 2021-03-13 17:45 ` [Bug middle-end/99579] " pinskia at gcc dot gnu.org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: wsnyder at wsnyder dot org @ 2021-03-13 16:49 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99579 Bug ID: 99579 Summary: gmon.out not created with -O0 but otherwise is Product: gcc Version: 9.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: wsnyder at wsnyder dot org Target Milestone: --- Created attachment 50382 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50382&action=edit Testcase == Description Type "make" in this tarball's directory. This will show (extra lines omitted): g++ -pg -O0 -c -o Vt_case_huge_prof__main.o Vt_case_huge_prof__main.ii @@@@@ Did we get a gmon? make: [Makefile:15: x] Error 1 (ignored) g++ -pg -Os -c -o Vt_case_huge_prof__main.o Vt_case_huge_prof__main.ii @@@@@ Did we get a gmon? 4554816 28 -rw-rw-r-- 1 user user 26943 Mar 13 11:33 ./gmon.out g++ -pg -O0 -c -o Vt_case_huge_prof__main.o Vt_case_huge_prof__main__ok.ii @@@@@ Did we get a gmon? 4554816 884 -rw-rw-r-- 1 user user 897414 Mar 13 11:33 ./gmon.out In short gcc -pg with -O0 is not creating a gmon. The problem goes away using -Os. The problem goes away if line 60549 of ~/d/case/Vt_case_huge_prof__main.ii std::array<CData , 16384> __Vtablechg1; is changed into CData __Vtablechg1[16384]; (The original program requires a unique class, not a std::array, so using C-style arrays is unfortunately not a workaround in my application.) While this "feels" like a memory corruption sort of bug, the program is sanitizer and warning clean. == gcc --version gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. == cat /etc/*release DISTRIB_DESCRIPTION="Ubuntu 20.04 LTS" ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/99579] gmon.out not created with -O0 but otherwise is 2021-03-13 16:49 [Bug c++/99579] New: gmon.out not created with -O0 but otherwise is wsnyder at wsnyder dot org @ 2021-03-13 17:45 ` pinskia at gcc dot gnu.org 2021-03-13 18:51 ` wsnyder at wsnyder dot org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2021-03-13 17:45 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99579 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WORKSFORME Status|UNCONFIRMED |RESOLVED --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- GCC is emitting the mcount call correctly for each function. Glibc is the library where the mcount is located and enabling of the timer (SIGPROF) is enabled and it controls the outputting of the gmon.out. >From what I can tell if the timer does not happen, then there will be no gmon.out outputted. With a slower/older machine (AMD Athlon(tm) II X4 640 Processor), I sometimes get gmon.out and sometimes don't. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/99579] gmon.out not created with -O0 but otherwise is 2021-03-13 16:49 [Bug c++/99579] New: gmon.out not created with -O0 but otherwise is wsnyder at wsnyder dot org 2021-03-13 17:45 ` [Bug middle-end/99579] " pinskia at gcc dot gnu.org @ 2021-03-13 18:51 ` wsnyder at wsnyder dot org 2021-03-13 19:08 ` wsnyder at wsnyder dot org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: wsnyder at wsnyder dot org @ 2021-03-13 18:51 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99579 --- Comment #2 from Wilson Snyder <wsnyder at wsnyder dot org> --- So glibc where to report this then? ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/99579] gmon.out not created with -O0 but otherwise is 2021-03-13 16:49 [Bug c++/99579] New: gmon.out not created with -O0 but otherwise is wsnyder at wsnyder dot org 2021-03-13 17:45 ` [Bug middle-end/99579] " pinskia at gcc dot gnu.org 2021-03-13 18:51 ` wsnyder at wsnyder dot org @ 2021-03-13 19:08 ` wsnyder at wsnyder dot org 2022-12-16 19:53 ` pinskia at gcc dot gnu.org 2022-12-16 19:53 ` pinskia at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: wsnyder at wsnyder dot org @ 2021-03-13 19:08 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99579 Wilson Snyder <wsnyder at wsnyder dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #3 from Wilson Snyder <wsnyder at wsnyder dot org> --- Thanks. Filed glibc bug here https://sourceware.org/bugzilla/show_bug.cgi?id=27576 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/99579] gmon.out not created with -O0 but otherwise is 2021-03-13 16:49 [Bug c++/99579] New: gmon.out not created with -O0 but otherwise is wsnyder at wsnyder dot org ` (2 preceding siblings ...) 2021-03-13 19:08 ` wsnyder at wsnyder dot org @ 2022-12-16 19:53 ` pinskia at gcc dot gnu.org 2022-12-16 19:53 ` pinskia at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2022-12-16 19:53 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99579 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|WORKSFORME |MOVED --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Moved to a glibc issue. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/99579] gmon.out not created with -O0 but otherwise is 2021-03-13 16:49 [Bug c++/99579] New: gmon.out not created with -O0 but otherwise is wsnyder at wsnyder dot org ` (3 preceding siblings ...) 2022-12-16 19:53 ` pinskia at gcc dot gnu.org @ 2022-12-16 19:53 ` pinskia at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu.org @ 2022-12-16 19:53 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99579 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Sid.Touati at inria dot fr --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- *** Bug 108146 has been marked as a duplicate of this bug. *** ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-12-16 19:53 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-03-13 16:49 [Bug c++/99579] New: gmon.out not created with -O0 but otherwise is wsnyder at wsnyder dot org 2021-03-13 17:45 ` [Bug middle-end/99579] " pinskia at gcc dot gnu.org 2021-03-13 18:51 ` wsnyder at wsnyder dot org 2021-03-13 19:08 ` wsnyder at wsnyder dot org 2022-12-16 19:53 ` pinskia at gcc dot gnu.org 2022-12-16 19:53 ` pinskia at gcc dot gnu.org
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).