public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Toon Moene <toon@moene.org>
To: Richard Guenther <richard.guenther@gmail.com>
Cc: gcc mailing list <gcc@gcc.gnu.org>
Subject: Re: lto1: internal compiler error: in lto_symtab_merge_decls_1, at 	lto-symtab.c:549
Date: Fri, 14 May 2010 13:34:00 -0000	[thread overview]
Message-ID: <4BED5176.5040109@moene.org> (raw)
In-Reply-To: <4BD42686.1050604@moene.org>

On 04/25/2010 01:24 PM, Toon Moene wrote:

> Richard Guenther wrote:

[ Concerning this assert ]

>> It is checking that for one symbol we only have one definition.
>>
>> You are using -fuse-linker-plugin?
>
> Indeed, I do (all of our code ends up in libraries - .a files - so I
> have to, to make -flto -fwhole-program be meaningful).
>
> Is it a problem with COMMON ? Those typically have umpteen definitions,
> which all have to match ...

I decided to change the following in lto-symtab.c to help me pinpoint 
this culprit:

Index: lto-symtab.c
===================================================================
--- lto-symtab.c        (revision 159389)
+++ lto-symtab.c        (working copy)
@@ -603,8 +603,15 @@
    /* Assert it's the only one.  */
    if (prevailing)
      for (e = prevailing->next; e; e = e->next)
-      gcc_assert (e->resolution != LDPR_PREVAILING_DEF_IRONLY
-                 && e->resolution != LDPR_PREVAILING_DEF);
+      {
+      if (!(e->resolution != LDPR_PREVAILING_DEF_IRONLY
+                 && e->resolution != LDPR_PREVAILING_DEF))
+        {
+         debug_tree(prevailing->decl);
+         debug_tree(e->decl);
+         gcc_assert(0);
+        }
+      }

    /* If there's not a prevailing symbol yet it's an external reference.
       Happens a lot during ltrans.  Choose the first symbol with a

That resulted in the following messages in my compile log:

  <function_decl 0x2b9d3a4af900 convect_satmixratio
     type <function_type 0x2b9d3a471000
         type <void_type 0x2b9d3548dd20 VOID
             align 8 symtab 0 alias set -1 canonical type 0x2b9d3548dd20
             pointer_to_this <pointer_type 0x2b9d3548ddc8>>
         QI
         size <integer_cst 0x2b9d3547e758 constant 8>
         unit size <integer_cst 0x2b9d3547e780 constant 1>
         align 8 symtab 0 alias set -1 canonical type 0x2b9d3a471000>
     public external QI file bkfconv.f90 line 7712 col 0 align 8>
  <function_decl 0x2b9d3a4af200 convect_satmixratio
     type <function_type 0x2b9d3a471000
         type <void_type 0x2b9d3548dd20 VOID
             align 8 symtab 0 alias set -1 canonical type 0x2b9d3548dd20
             pointer_to_this <pointer_type 0x2b9d3548ddc8>>
         QI
         size <integer_cst 0x2b9d3547e758 constant 8>
         unit size <integer_cst 0x2b9d3547e780 constant 1>
         align 8 symtab 0 alias set -1 canonical type 0x2b9d3a471000>
     public external QI file bkfconv.f90 line 6525 col 0 align 8>
lto1: internal compiler error: in lto_symtab_merge_decls_1, at 
lto-symtab.c:612

bkconv.f90:7712:

    7711 !
    7712        CALL CONVECT_SATMIXRATIO( KLON, ZWORK1, ZTELCL, ZWORK3, 
ZLV, ZLS, ZCPH )

bkfconv.f90:6525:
    6524 !
    6525      CALL CONVECT_SATMIXRATIO( KLON, ZPLCL, ZTLCL, ZWORK1, ZLV, 
ZWORK2, ZCPH )

The only thing I can see is that CONVECT_SATMIXRATIO is called from two 
different routines in one file (bkfconv.f90:6260 CONVECT_TRIGGER_SHAL 
and bkfconv.f90:7258 CONVECT_CLOSURE_SHAL)

Any suggestions how I can further chase this down ?  Are the arguments 
to the subroutine an issue (kind, array size, etc.) ?

Thanks in advance,

-- 
Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/
Progress of GNU Fortran: http://gcc.gnu.org/gcc-4.5/changes.html#Fortran

  parent reply	other threads:[~2010-05-14 13:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-24 13:48 Toon Moene
2010-04-24 18:11 ` Richard Guenther
2010-04-25 11:28   ` Toon Moene
2010-04-25 19:34     ` Richard Guenther
2010-04-25 19:49       ` Steven Bosscher
2010-04-25 21:01         ` Richard Guenther
2010-04-25 22:16           ` Dave Korn
2010-04-25 22:21             ` Steven Bosscher
2010-04-26  2:13               ` Dave Korn
2010-04-26 10:00                 ` Richard Guenther
     [not found]                   ` <4BD906D5.1010408@gmail.com>
2010-04-29  9:13                     ` LTO vs static library archives [was Re: lto1: internal compiler error: in lto_symtab_merge_decls_1, at lto-symtab.c:549] Richard Guenther
2010-04-29  9:21                       ` Steven Bosscher
2010-04-29 13:03                         ` Richard Guenther
2010-04-29 14:08                       ` Jan Hubicka
2010-04-29 15:24                         ` Richard Guenther
2010-04-29 16:09                           ` Jan Hubicka
2010-04-29 14:27                       ` Ian Lance Taylor
2010-05-14 13:34     ` Toon Moene [this message]
2010-05-14 13:40       ` lto1: internal compiler error: in lto_symtab_merge_decls_1, at lto-symtab.c:549 Richard Guenther
2010-05-15  9:47         ` Toon Moene

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BED5176.5040109@moene.org \
    --to=toon@moene.org \
    --cc=gcc@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).