public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/46150] New: -fcompare-debug failure (length) with -fPIC -O2
@ 2010-10-23 15:33 zsojka at seznam dot cz
  2010-10-23 15:54 ` [Bug debug/46150] " zsojka at seznam dot cz
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2010-10-23 15:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46150

           Summary: -fcompare-debug failure (length) with -fPIC -O2
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 22135
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22135
packed preprocessed source

Compiler output:
$ gcc -fPIC -O2 -fcompare-debug native-filter.ii 
gcc: error: native-filter.ii: -fcompare-debug failure (length)

Reducing the testcase is incredibly slow, so I am attaching the original
testcase.
It is from kig sources, GPLv2 license, http://edu.kde.org/kig/

Tested revisions:
r165822 - fail
r163636 - OK
r161659 - OK


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

* [Bug debug/46150] -fcompare-debug failure (length) with -fPIC -O2
  2010-10-23 15:33 [Bug debug/46150] New: -fcompare-debug failure (length) with -fPIC -O2 zsojka at seznam dot cz
@ 2010-10-23 15:54 ` zsojka at seznam dot cz
  2010-10-23 17:11 ` hjl.tools at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2010-10-23 15:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46150

--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> 2010-10-23 15:53:58 UTC ---
Created attachment 22136
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22136
diff native-filter.gk.gkd native-filter.gkd


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

* [Bug debug/46150] -fcompare-debug failure (length) with -fPIC -O2
  2010-10-23 15:33 [Bug debug/46150] New: -fcompare-debug failure (length) with -fPIC -O2 zsojka at seznam dot cz
  2010-10-23 15:54 ` [Bug debug/46150] " zsojka at seznam dot cz
@ 2010-10-23 17:11 ` hjl.tools at gmail dot com
  2010-10-26  0:37 ` [Bug debug/46150] [4.6 Regression] " jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2010-10-23 17:11 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46150

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.10.23 17:10:48
                 CC|                            |hjl.tools at gmail dot com,
                   |                            |jamborm at gcc dot gnu.org
   Target Milestone|---                         |4.6.0
     Ever Confirmed|0                           |1

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2010-10-23 17:10:48 UTC ---
It is caused by revision 164136:

http://gcc.gnu.org/ml/gcc-cvs/2010-09/msg00428.html


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

* [Bug debug/46150] [4.6 Regression] -fcompare-debug failure (length) with -fPIC -O2
  2010-10-23 15:33 [Bug debug/46150] New: -fcompare-debug failure (length) with -fPIC -O2 zsojka at seznam dot cz
  2010-10-23 15:54 ` [Bug debug/46150] " zsojka at seznam dot cz
  2010-10-23 17:11 ` hjl.tools at gmail dot com
@ 2010-10-26  0:37 ` jakub at gcc dot gnu.org
  2010-11-09 12:59 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-10-26  0:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46150

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
                 CC|                            |jakub at gcc dot gnu.org


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

* [Bug debug/46150] [4.6 Regression] -fcompare-debug failure (length) with -fPIC -O2
  2010-10-23 15:33 [Bug debug/46150] New: -fcompare-debug failure (length) with -fPIC -O2 zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2010-10-26  0:37 ` [Bug debug/46150] [4.6 Regression] " jakub at gcc dot gnu.org
@ 2010-11-09 12:59 ` jakub at gcc dot gnu.org
  2010-11-10 21:08 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-09 12:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46150

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-09 12:59:19 UTC ---
Created attachment 22344
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22344
pr46150.ii

Partially reduced testcase, gave up after several days of running delta on it.


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

* [Bug debug/46150] [4.6 Regression] -fcompare-debug failure (length) with -fPIC -O2
  2010-10-23 15:33 [Bug debug/46150] New: -fcompare-debug failure (length) with -fPIC -O2 zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2010-11-09 12:59 ` jakub at gcc dot gnu.org
@ 2010-11-10 21:08 ` jakub at gcc dot gnu.org
  2010-11-11  8:10 ` jakub at gcc dot gnu.org
  2010-11-11  8:29 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-10 21:08 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46150

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-10 21:08:05 UTC ---
Created attachment 22368
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22368
gcc46-pr46150.patch

Ugh, this is ugly.

We start having differences during ivopts.  The problem is that the
data->inv_expr_tab htab uses quite strict hash (iterative_hash_expr) which, as
it hashes stuff like TYPE_UID or DECL_UID, sometimes differs between -g and
-g0,
but very lax equality function (operand_equal_p).  The hash table is not
traversed, but as the equality function doesn't check hash value, depending on
the exact hash values we might or might not try to call the equality function
on expressions with different hash values.  In the testcase, there was
__result_14(D) + (-8 - (long unsigned int) &MEM[(struct _Vector_impl
*)__result_14(D) + 8B])
expression already in hash table and
(int *) __result_14(D) + (-8 - (long unsigned int) &MEM[(struct _Vector_impl
*)__result_14(D) + 8B])
expression being looked up.  In one case the equality function happened to be
run between these two and said their are equal, in the other case a new slot
has been created and that resulted later on in various small ivopts behavior
differences.

Attached patch fixes this testcase, but in theory it is not sufficient, we
could with very bad luck have two non-identical expressions that could in one
case (-g or -g0) hash to the same hash value and in the other case to different
values, but the lax operand_equal_p would still consider them to be equal.  So,
ideally we'd like to use some less lax comparison function which would match
the hashing function (basically compare all things that the hash function
hashes).  That said, I guess for 4.6 this patch ought to suffice (and I hope it
won't pessimize code too much, as sometimes we'll no longer hit matches that
happened by pure luck).


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

* [Bug debug/46150] [4.6 Regression] -fcompare-debug failure (length) with -fPIC -O2
  2010-10-23 15:33 [Bug debug/46150] New: -fcompare-debug failure (length) with -fPIC -O2 zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2010-11-10 21:08 ` jakub at gcc dot gnu.org
@ 2010-11-11  8:10 ` jakub at gcc dot gnu.org
  2010-11-11  8:29 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-11  8:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46150

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-11 08:09:56 UTC ---
Author: jakub
Date: Thu Nov 11 08:09:46 2010
New Revision: 166595

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166595
Log:
    PR debug/46150
    * tree-ssa-loop-ivopts.c (htab_inv_expr_eq): Don't return
    true if expr1->hash != expr2->hash.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-loop-ivopts.c


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

* [Bug debug/46150] [4.6 Regression] -fcompare-debug failure (length) with -fPIC -O2
  2010-10-23 15:33 [Bug debug/46150] New: -fcompare-debug failure (length) with -fPIC -O2 zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2010-11-11  8:10 ` jakub at gcc dot gnu.org
@ 2010-11-11  8:29 ` jakub at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-11  8:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46150

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-11 08:29:19 UTC ---
Fixed.


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

end of thread, other threads:[~2010-11-11  8:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-23 15:33 [Bug debug/46150] New: -fcompare-debug failure (length) with -fPIC -O2 zsojka at seznam dot cz
2010-10-23 15:54 ` [Bug debug/46150] " zsojka at seznam dot cz
2010-10-23 17:11 ` hjl.tools at gmail dot com
2010-10-26  0:37 ` [Bug debug/46150] [4.6 Regression] " jakub at gcc dot gnu.org
2010-11-09 12:59 ` jakub at gcc dot gnu.org
2010-11-10 21:08 ` jakub at gcc dot gnu.org
2010-11-11  8:10 ` jakub at gcc dot gnu.org
2010-11-11  8:29 ` jakub 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).