public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/48333] New: -fcompare-debug failure (length) - "memmove" x "__builtin_memmove"
@ 2011-03-29 13:10 zsojka at seznam dot cz
2011-03-30 8:42 ` [Bug debug/48333] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2011-03-29 13:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48333
Summary: -fcompare-debug failure (length) - "memmove" x
"__builtin_memmove"
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zsojka@seznam.cz
CC: aoliva@gcc.gnu.org
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 23798
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23798
partially reduced testcase
Compiler output:
$ gcc -O -fkeep-inline-functions -fcompare-debug testcase.ii
testcase.ii: In function ‘std::_Resetiosflags
std::resetiosflags(std::ios_base::fmtflags)’:
testcase.ii:20948:5: warning: extended initializer lists only available with
-std=c++0x or -std=gnu++0x [enabled by default]
testcase.ii: In function ‘std::_Setiosflags
std::setiosflags(std::ios_base::fmtflags)’:
testcase.ii:20966:5: warning: extended initializer lists only available with
-std=c++0x or -std=gnu++0x [enabled by default]
testcase.ii: In function ‘std::_Setbase std::setbase(int)’:
testcase.ii:20984:5: warning: extended initializer lists only available with
-std=c++0x or -std=gnu++0x [enabled by default]
testcase.ii: In function ‘std::_Setfill<_CharT> std::setfill(_CharT)’:
testcase.ii:21010:7: warning: extended initializer lists only available with
-std=c++0x or -std=gnu++0x [enabled by default]
testcase.ii: In function ‘std::_Setprecision std::setprecision(int)’:
testcase.ii:21028:5: warning: extended initializer lists only available with
-std=c++0x or -std=gnu++0x [enabled by default]
testcase.ii: In function ‘std::_Setw std::setw(int)’:
testcase.ii:21046:5: warning: extended initializer lists only available with
-std=c++0x or -std=gnu++0x [enabled by default]
gcc: error: testcase.ii: -fcompare-debug failure (length)
$ diff testcase.*gkd
24071c24071
< (call (mem:QI (symbol_ref:DI ("memmove") [flags 0x41] <function_decl
# memmove>) [ memmove S1 A8])
---
> (call (mem:QI (symbol_ref:DI ("memmove") [flags 0x41] <function_decl # memmove>) [ __builtin_memmove S1 A8])
Reducing the testcase is very slow. I met this problem several times, but never
with a small testcase.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/48333] -fcompare-debug failure (length) - "memmove" x "__builtin_memmove"
2011-03-29 13:10 [Bug debug/48333] New: -fcompare-debug failure (length) - "memmove" x "__builtin_memmove" zsojka at seznam dot cz
@ 2011-03-30 8:42 ` rguenth at gcc dot gnu.org
2011-03-30 22:40 ` aoliva at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-30 8:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48333
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-30 08:39:16 UTC ---
Interesting ;)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/48333] -fcompare-debug failure (length) - "memmove" x "__builtin_memmove"
2011-03-29 13:10 [Bug debug/48333] New: -fcompare-debug failure (length) - "memmove" x "__builtin_memmove" zsojka at seznam dot cz
2011-03-30 8:42 ` [Bug debug/48333] " rguenth at gcc dot gnu.org
@ 2011-03-30 22:40 ` aoliva at gcc dot gnu.org
2011-03-31 7:53 ` aoliva at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: aoliva at gcc dot gnu.org @ 2011-03-30 22:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48333
Alexandre Oliva <aoliva at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011.03.30 21:45:57
AssignedTo|unassigned at gcc dot |aoliva at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #2 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2011-03-30 21:45:57 UTC ---
Mine. -fcompare-debug fails similarly (fwrite_unlocked vs builtin) on c-pch.c
during bootstrap, too.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/48333] -fcompare-debug failure (length) - "memmove" x "__builtin_memmove"
2011-03-29 13:10 [Bug debug/48333] New: -fcompare-debug failure (length) - "memmove" x "__builtin_memmove" zsojka at seznam dot cz
2011-03-30 8:42 ` [Bug debug/48333] " rguenth at gcc dot gnu.org
2011-03-30 22:40 ` aoliva at gcc dot gnu.org
@ 2011-03-31 7:53 ` aoliva at gcc dot gnu.org
2011-05-19 11:07 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: aoliva at gcc dot gnu.org @ 2011-03-31 7:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48333
--- Comment #3 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2011-03-31 06:12:22 UTC ---
Created attachment 23832
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23832
Patch that fixes the bug
It's a garbage collection issue: we're supposed to share mem_attrs involving
__builtin and non-__builtin functions, and we do, unless GC manages to discard
mem_attrs at precisely the worst possible moment, and does so at only one of
the compilations, and we're unlucky to end up inserting a different one next
time it is required.
A more general solution would amount to checking for builtins at dump time, and
discarding the __builtin prefix or noting it as optional or somesuch, but I'm
testing this simpler and hopefully effective solution instead.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/48333] -fcompare-debug failure (length) - "memmove" x "__builtin_memmove"
2011-03-29 13:10 [Bug debug/48333] New: -fcompare-debug failure (length) - "memmove" x "__builtin_memmove" zsojka at seznam dot cz
` (2 preceding siblings ...)
2011-03-31 7:53 ` aoliva at gcc dot gnu.org
@ 2011-05-19 11:07 ` jakub at gcc dot gnu.org
2011-06-04 10:09 ` aoliva at gcc dot gnu.org
2011-06-04 10:18 ` aoliva at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-05-19 11:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48333
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-05-19 10:35:16 UTC ---
Can you please ping this patch?
It makes sense given:
case tcc_declaration:
/* Consider __builtin_sqrt equal to sqrt. */
return (TREE_CODE (arg0) == FUNCTION_DECL
&& DECL_BUILT_IN (arg0) && DECL_BUILT_IN (arg1)
&& DECL_BUILT_IN_CLASS (arg0) == DECL_BUILT_IN_CLASS (arg1)
&& DECL_FUNCTION_CODE (arg0) == DECL_FUNCTION_CODE (arg1));
in operand_equal_p...
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/48333] -fcompare-debug failure (length) - "memmove" x "__builtin_memmove"
2011-03-29 13:10 [Bug debug/48333] New: -fcompare-debug failure (length) - "memmove" x "__builtin_memmove" zsojka at seznam dot cz
` (3 preceding siblings ...)
2011-05-19 11:07 ` jakub at gcc dot gnu.org
@ 2011-06-04 10:09 ` aoliva at gcc dot gnu.org
2011-06-04 10:18 ` aoliva at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: aoliva at gcc dot gnu.org @ 2011-06-04 10:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48333
--- Comment #5 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2011-06-04 10:08:12 UTC ---
Author: aoliva
Date: Sat Jun 4 10:08:09 2011
New Revision: 174636
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174636
Log:
PR debug/48333
* calls.c (emit_call_1): Prefer the __builtin declaration of
builtin functions.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/calls.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/48333] -fcompare-debug failure (length) - "memmove" x "__builtin_memmove"
2011-03-29 13:10 [Bug debug/48333] New: -fcompare-debug failure (length) - "memmove" x "__builtin_memmove" zsojka at seznam dot cz
` (4 preceding siblings ...)
2011-06-04 10:09 ` aoliva at gcc dot gnu.org
@ 2011-06-04 10:18 ` aoliva at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: aoliva at gcc dot gnu.org @ 2011-06-04 10:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48333
Alexandre Oliva <aoliva at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #6 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2011-06-04 10:18:16 UTC ---
Fixed
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-06-04 10:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-29 13:10 [Bug debug/48333] New: -fcompare-debug failure (length) - "memmove" x "__builtin_memmove" zsojka at seznam dot cz
2011-03-30 8:42 ` [Bug debug/48333] " rguenth at gcc dot gnu.org
2011-03-30 22:40 ` aoliva at gcc dot gnu.org
2011-03-31 7:53 ` aoliva at gcc dot gnu.org
2011-05-19 11:07 ` jakub at gcc dot gnu.org
2011-06-04 10:09 ` aoliva at gcc dot gnu.org
2011-06-04 10:18 ` aoliva 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).