public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/42451] 'warning: type of "array" does not match original declaration' with -flto/-fwhopr
  2009-12-21 19:06 [Bug lto/42451] New: 'warning: type of "array" does not match original declaration' with -flto/-fwhopr zsojka at seznam dot cz
@ 2009-12-21 19:06 ` zsojka at seznam dot cz
  2009-12-21 19:07 ` zsojka at seznam dot cz
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2009-12-21 19:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from zsojka at seznam dot cz  2009-12-21 19:06 -------
Created an attachment (id=19359)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19359&action=view)
first source file (preprocessed, reduced)


-- 


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


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

* [Bug lto/42451]  New: 'warning: type of "array" does not match original declaration' with -flto/-fwhopr
@ 2009-12-21 19:06 zsojka at seznam dot cz
  2009-12-21 19:06 ` [Bug lto/42451] " zsojka at seznam dot cz
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2009-12-21 19:06 UTC (permalink / raw)
  To: gcc-bugs

Command line:
g++ B.ii C.ii -fPIC -shared -flto
or
g++ B.ii C.ii -fPIC -shared -fwhopr

Tested revisions:
r155363 - warns
r155248 - warns
r155141 - warns
r154886 - warns


Output (r155363, r155248):
$ /mnt/svn/gcc-trunk/binary-155363-lto/bin/g++ B.ii C.ii -fPIC -shared -fwhopr
header.hpp:10:19: warning: type of ‘array’ does not match original
declaration
B.cpp:7:14: note: previously declared here


Output (r155141, r154886):
$ /mnt/svn/gcc-trunk/binary-155141-lto-checking-release/bin/g++ B.ii C.ii -fPIC
-shared -fwhopr
header.hpp:10:19: warning: type of ‘array’ does not match original
declaration
B.cpp:7:14: note: previously declared here
/tmp/cclAkKXS.wpa.ltrans.o:(.bss._ZN1B5arrayE[_ZN1B5arrayE]+0x0): multiple
definition of `_ZN1B5arrayE'
/tmp/ccv6HwKA.wpa.ltrans.o:(.bss+0x20): first defined here
/tmp/cclAkKXS.wpa.ltrans.o:(.bss.c[c]+0x0): multiple definition of `c'
/tmp/ccv6HwKA.wpa.ltrans.o:(.bss+0x0): first defined here
collect2: ld returned 1 exit status


-- 
           Summary: 'warning: type of "array" does not match original
                    declaration' with -flto/-fwhopr
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu


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


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

* [Bug lto/42451] 'warning: type of "array" does not match original declaration' with -flto/-fwhopr
  2009-12-21 19:06 [Bug lto/42451] New: 'warning: type of "array" does not match original declaration' with -flto/-fwhopr zsojka at seznam dot cz
  2009-12-21 19:06 ` [Bug lto/42451] " zsojka at seznam dot cz
@ 2009-12-21 19:07 ` zsojka at seznam dot cz
  2009-12-21 20:19 ` zsojka at seznam dot cz
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2009-12-21 19:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from zsojka at seznam dot cz  2009-12-21 19:06 -------
Created an attachment (id=19360)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19360&action=view)
second source file (preprocessed, reduced)


-- 


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


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

* [Bug lto/42451] 'warning: type of "array" does not match original declaration' with -flto/-fwhopr
  2009-12-21 19:06 [Bug lto/42451] New: 'warning: type of "array" does not match original declaration' with -flto/-fwhopr zsojka at seznam dot cz
  2009-12-21 19:06 ` [Bug lto/42451] " zsojka at seznam dot cz
  2009-12-21 19:07 ` zsojka at seznam dot cz
@ 2009-12-21 20:19 ` zsojka at seznam dot cz
  2009-12-25 18:42 ` zsojka at seznam dot cz
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2009-12-21 20:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from zsojka at seznam dot cz  2009-12-21 20:19 -------
I am also receiving ICE (with checking enabled) probably caused by this
incompability. I can provide reduced sources if needed, demonstrating that (it
would probably take several days of reducing).
The crash message in that case is:
lto1: internal compiler error: in input_gimple_stmt, at lto-streamer-in.c:1093


-- 


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


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

* [Bug lto/42451] 'warning: type of "array" does not match original declaration' with -flto/-fwhopr
  2009-12-21 19:06 [Bug lto/42451] New: 'warning: type of "array" does not match original declaration' with -flto/-fwhopr zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2009-12-21 20:19 ` zsojka at seznam dot cz
@ 2009-12-25 18:42 ` zsojka at seznam dot cz
  2010-02-17  1:07 ` zsojka at seznam dot cz
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2009-12-25 18:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from zsojka at seznam dot cz  2009-12-25 18:42 -------
Created an attachment (id=19392)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19392&action=view)
testcase reproducing the crash (with checking enabled)

I wasn't able to reduce number of input files, so they are archived.


-- 


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


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

* [Bug lto/42451] 'warning: type of "array" does not match original declaration' with -flto/-fwhopr
  2009-12-21 19:06 [Bug lto/42451] New: 'warning: type of "array" does not match original declaration' with -flto/-fwhopr zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2009-12-25 18:42 ` zsojka at seznam dot cz
@ 2010-02-17  1:07 ` zsojka at seznam dot cz
  2010-03-01 12:47 ` d dot g dot gorbachev at gmail dot com
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2010-02-17  1:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from zsojka at seznam dot cz  2010-02-17 01:07 -------
Testcase from comment #4 still fails in trunk with checking enabled:

$ /mnt/svn/gcc-trunk/binary-156800-lto/bin/gcc -fPIC -shared -flto 1.cpp 2.cpp
3.cpp
header.h:10:20: warning: type of ‘array’ does not match original
declaration
2.cpp:7:14: note: previously declared here
In function ‘f3’:
lto1: internal compiler error: in input_gimple_stmt, at lto-streamer-in.c:1093
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /mnt/svn/gcc-trunk/binary-156800-lto/bin/gcc returned 1 exit
status
collect2: lto-wrapper returned 1 exit status


-- 

zsojka at seznam dot cz changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic, ice-checking,
                   |                            |ice-on-valid-code


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


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

* [Bug lto/42451] 'warning: type of "array" does not match original declaration' with -flto/-fwhopr
  2009-12-21 19:06 [Bug lto/42451] New: 'warning: type of "array" does not match original declaration' with -flto/-fwhopr zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2010-02-17  1:07 ` zsojka at seznam dot cz
@ 2010-03-01 12:47 ` d dot g dot gorbachev at gmail dot com
  2010-04-23 16:04 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: d dot g dot gorbachev at gmail dot com @ 2010-03-01 12:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from d dot g dot gorbachev at gmail dot com  2010-03-01 12:47 -------
Created an attachment (id=19996)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19996&action=view)
Another testcase

Compile with `gcc -flto 1.c 2.c'


-- 


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


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

* [Bug lto/42451] 'warning: type of "array" does not match original declaration' with -flto/-fwhopr
  2009-12-21 19:06 [Bug lto/42451] New: 'warning: type of "array" does not match original declaration' with -flto/-fwhopr zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2010-03-01 12:47 ` d dot g dot gorbachev at gmail dot com
@ 2010-04-23 16:04 ` rguenth at gcc dot gnu dot org
  2010-06-01 19:23 ` zsojka at seznam dot cz
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-04-23 16:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2010-04-23 16:03 -------
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-04-23 16:03:35
               date|                            |


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


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

* [Bug lto/42451] 'warning: type of "array" does not match original declaration' with -flto/-fwhopr
  2009-12-21 19:06 [Bug lto/42451] New: 'warning: type of "array" does not match original declaration' with -flto/-fwhopr zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2010-04-23 16:04 ` rguenth at gcc dot gnu dot org
@ 2010-06-01 19:23 ` zsojka at seznam dot cz
  2010-07-20 14:21 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2010-06-01 19:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from zsojka at seznam dot cz  2010-06-01 19:22 -------
Testcases from comment #1/#2 and comment #4 no longer fail in r160112. They
stopped failing between r158969 and r159696.

Testcase from comment #6 still fails for me (x86_64-linux)


-- 


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


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

* [Bug lto/42451] 'warning: type of "array" does not match original declaration' with -flto/-fwhopr
  2009-12-21 19:06 [Bug lto/42451] New: 'warning: type of "array" does not match original declaration' with -flto/-fwhopr zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2010-06-01 19:23 ` zsojka at seznam dot cz
@ 2010-07-20 14:21 ` rguenth at gcc dot gnu dot org
  2010-07-22 13:48 ` rguenth at gcc dot gnu dot org
  2010-07-22 13:49 ` rguenth at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-20 14:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenth at gcc dot gnu dot org  2010-07-20 14:21 -------
The issue is with the cache for outcomes of gimple_types_compatible_p.  When
hitting cycles in the type graph we assume equality but also record final
decisions based on it.

So we end up merging the two struct link instances, but only at the 2nd
time visiting it.  IIRC this is a similar reason as to why we introduced
SCC visiting for the hashing part.

I have a more simpler workaround.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-04-23 16:03:35         |2010-07-20 14:21:28
               date|                            |


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


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

* [Bug lto/42451] 'warning: type of "array" does not match original declaration' with -flto/-fwhopr
  2009-12-21 19:06 [Bug lto/42451] New: 'warning: type of "array" does not match original declaration' with -flto/-fwhopr zsojka at seznam dot cz
                   ` (8 preceding siblings ...)
  2010-07-20 14:21 ` rguenth at gcc dot gnu dot org
@ 2010-07-22 13:48 ` rguenth at gcc dot gnu dot org
  2010-07-22 13:49 ` rguenth at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-22 13:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from rguenth at gcc dot gnu dot org  2010-07-22 13:47 -------
Subject: Bug 42451

Author: rguenth
Date: Thu Jul 22 13:47:32 2010
New Revision: 162415

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162415
Log:
2010-07-22  Richard Guenther  <rguenther@suse.de>

        PR lto/42451
        * gimple.c (gtc_next_dfs_num): New global.
        (struct sccs): Make value a union, add integer same_p member.
        (gtc_visit): New function.
        (gimple_types_compatible_p_1): New function, split out from ...
        (gimple_types_compatible_p): ... here.  Start a DFS walk here.
        (iterative_hash_gimple_type): Adjust for sccs change.

        * gcc.dg/lto/20100720-3_0.c: New testcase.
        * gcc.dg/lto/20100720-3_1.c: Likewise.

Added:
    trunk/gcc/testsuite/gcc.dg/lto/20100720-3_0.c
    trunk/gcc/testsuite/gcc.dg/lto/20100720-3_1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimple.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug lto/42451] 'warning: type of "array" does not match original declaration' with -flto/-fwhopr
  2009-12-21 19:06 [Bug lto/42451] New: 'warning: type of "array" does not match original declaration' with -flto/-fwhopr zsojka at seznam dot cz
                   ` (9 preceding siblings ...)
  2010-07-22 13:48 ` rguenth at gcc dot gnu dot org
@ 2010-07-22 13:49 ` rguenth at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-22 13:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from rguenth at gcc dot gnu dot org  2010-07-22 13:49 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|                            |4.6.0
         Resolution|                            |FIXED
   Target Milestone|---                         |4.6.0


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


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

end of thread, other threads:[~2010-07-22 13:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-21 19:06 [Bug lto/42451] New: 'warning: type of "array" does not match original declaration' with -flto/-fwhopr zsojka at seznam dot cz
2009-12-21 19:06 ` [Bug lto/42451] " zsojka at seznam dot cz
2009-12-21 19:07 ` zsojka at seznam dot cz
2009-12-21 20:19 ` zsojka at seznam dot cz
2009-12-25 18:42 ` zsojka at seznam dot cz
2010-02-17  1:07 ` zsojka at seznam dot cz
2010-03-01 12:47 ` d dot g dot gorbachev at gmail dot com
2010-04-23 16:04 ` rguenth at gcc dot gnu dot org
2010-06-01 19:23 ` zsojka at seznam dot cz
2010-07-20 14:21 ` rguenth at gcc dot gnu dot org
2010-07-22 13:48 ` rguenth at gcc dot gnu dot org
2010-07-22 13:49 ` rguenth at gcc dot gnu dot 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).