public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/66021] GCC miscompiles Z3
[not found] <bug-66021-4@http.gcc.gnu.org/bugzilla/>
@ 2015-05-05 17:14 ` nunoplopes at sapo dot pt
2015-05-05 17:16 ` nunoplopes at sapo dot pt
` (5 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: nunoplopes at sapo dot pt @ 2015-05-05 17:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66021
--- Comment #1 from Nuno Lopes <nunoplopes at sapo dot pt> ---
Sorry, a bit more information the problem:
On function void
reduce_args_tactic::imp::populate_decl2args_proc::operator()(app * n), when
compiled with -O0 no call to memory::deallocate(void* p) is made, while with
-O2 memory::deallocate is called with p == 0, which cannot happen (since it's
called through dealloc_svect, which bails out if the pointer is null).
Apologies for not being able to reduce the test case; I don't have much
experience with the gcc internals.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/66021] GCC miscompiles Z3
[not found] <bug-66021-4@http.gcc.gnu.org/bugzilla/>
2015-05-05 17:14 ` [Bug middle-end/66021] GCC miscompiles Z3 nunoplopes at sapo dot pt
@ 2015-05-05 17:16 ` nunoplopes at sapo dot pt
2015-05-05 18:15 ` nunoplopes at sapo dot pt
` (4 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: nunoplopes at sapo dot pt @ 2015-05-05 17:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66021
--- Comment #2 from Nuno Lopes <nunoplopes at sapo dot pt> ---
Created attachment 35465
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35465&action=edit
test case
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/66021] GCC miscompiles Z3
[not found] <bug-66021-4@http.gcc.gnu.org/bugzilla/>
2015-05-05 17:14 ` [Bug middle-end/66021] GCC miscompiles Z3 nunoplopes at sapo dot pt
2015-05-05 17:16 ` nunoplopes at sapo dot pt
@ 2015-05-05 18:15 ` nunoplopes at sapo dot pt
2015-05-05 23:46 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: nunoplopes at sapo dot pt @ 2015-05-05 18:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66021
--- Comment #3 from Nuno Lopes <nunoplopes at sapo dot pt> ---
Created attachment 35467
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35467&action=edit
reduced test case
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/66021] GCC miscompiles Z3
[not found] <bug-66021-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2015-05-05 18:15 ` nunoplopes at sapo dot pt
@ 2015-05-05 23:46 ` pinskia at gcc dot gnu.org
2015-05-10 15:45 ` nunoplopes at sapo dot pt
` (2 subsequent siblings)
6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-05-05 23:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66021
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Nuno Lopes from comment #3)
> Created attachment 35467 [details]
> reduced test case
The reduced testcase is compiled correctly in that the deallocate is called
unconditional with zero argument:
bit_vector() : m_num_bits(0), m_capacity(0), m_data(0) {
memory::deallocate(m_data);
}
m_data will be NULL always when deallocate is called.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/66021] GCC miscompiles Z3
[not found] <bug-66021-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2015-05-05 23:46 ` pinskia at gcc dot gnu.org
@ 2015-05-10 15:45 ` nunoplopes at sapo dot pt
2015-05-10 21:40 ` pinskia at gcc dot gnu.org
2015-05-10 21:45 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 7+ messages in thread
From: nunoplopes at sapo dot pt @ 2015-05-10 15:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66021
Nuno Lopes <nunoplopes at sapo dot pt> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #35467|0 |1
is obsolete| |
--- Comment #5 from Nuno Lopes <nunoplopes at sapo dot pt> ---
Created attachment 35514
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35514&action=edit
Reduced test case
Previous reduced test case was bogus. This one should be ok.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/66021] GCC miscompiles Z3
[not found] <bug-66021-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2015-05-10 15:45 ` nunoplopes at sapo dot pt
@ 2015-05-10 21:40 ` pinskia at gcc dot gnu.org
2015-05-10 21:45 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-05-10 21:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66021
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note even though the length that is passed to memcpy is zero, the arguments
have to be non-null. So adding the check around the call to memcpy should fix
the issue.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/66021] GCC miscompiles Z3
[not found] <bug-66021-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2015-05-10 21:40 ` pinskia at gcc dot gnu.org
@ 2015-05-10 21:45 ` pinskia at gcc dot gnu.org
6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-05-10 21:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66021
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Basically GCC understands that memcpy takes non-null arguments and optimizes
based on that.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-05-10 21:45 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-66021-4@http.gcc.gnu.org/bugzilla/>
2015-05-05 17:14 ` [Bug middle-end/66021] GCC miscompiles Z3 nunoplopes at sapo dot pt
2015-05-05 17:16 ` nunoplopes at sapo dot pt
2015-05-05 18:15 ` nunoplopes at sapo dot pt
2015-05-05 23:46 ` pinskia at gcc dot gnu.org
2015-05-10 15:45 ` nunoplopes at sapo dot pt
2015-05-10 21:40 ` pinskia at gcc dot gnu.org
2015-05-10 21:45 ` 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).