public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/60721] New: xcoral fails to build with LTO: internal compiler error: verify_flow_info failed
@ 2014-03-31 13:41 rguenth at gcc dot gnu.org
  2014-03-31 13:50 ` [Bug lto/60721] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-31 13:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60721
           Summary: xcoral fails to build with LTO: internal compiler
                    error: verify_flow_info failed
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: lto
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org

Created attachment 32497
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32497&action=edit
testcase

> ./xgcc -B. xcoral.i smac.i -fltoxcoral.c: In function 'main':
xcoral.c:216:2: warning: ignoring return value of 'fgets', declared with
attribute warn_unused_result [-Wunused-result]
xcoral.c:238:3: warning: ignoring return value of 'chdir', declared with
attribute warn_unused_result [-Wunused-result]
xcoral.c:273:2: warning: ignoring return value of 'chdir', declared with
attribute warn_unused_result [-Wunused-result]
Smac/smac.c: In function 'init_smac':
Smac/smac.c:176:8: error: control flow in the middle of basic block 2
Smac/smac.c:176:8: error: control flow in the middle of basic block 5
Smac/smac.c:176:8: internal compiler error: verify_flow_info failed
0x69cff9 verify_flow_info()
        /space/rguenther/src/svn/trunk/gcc/cfghooks.c:260
0xb2064a cleanup_tree_cfg_noloop
        /space/rguenther/src/svn/trunk/gcc/tree-cfgcleanup.c:746
0xb20716 cleanup_tree_cfg()
        /space/rguenther/src/svn/trunk/gcc/tree-cfgcleanup.c:801
0x9ed861 execute_function_todo


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

* [Bug lto/60721] xcoral fails to build with LTO: internal compiler error: verify_flow_info failed
  2014-03-31 13:41 [Bug lto/60721] New: xcoral fails to build with LTO: internal compiler error: verify_flow_info failed rguenth at gcc dot gnu.org
@ 2014-03-31 13:50 ` rguenth at gcc dot gnu.org
  2014-04-01 11:21 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-31 13:50 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
(gdb) p debug_bb (bb)
<bb 2>:
result_5 = getenv ("SMAC_STACK_SIZE");
if (result_5 != 0B)
  goto <bb 3>;
else
  goto <bb 5>;
(gdb) p debug_generic_expr (cfun->decl)
init_smac

in one unit getenv is pulled in via a header leading to

extern char *getenv (const char *__name) __attribute__ ((__nothrow__ ,
__leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__
((__warn_unused_result__));

(note the leaf attribute), and in the other we have

int
main ( argc, argv )
    int argc;
    char **argv;
{
...
  extern char *getenv ();

this means that if cfun->calls_setjmp as in this case, this can make a
difference.  This is verifying after IPA transforms took place.

It seems that 'leaf' is a decl attribute and thus is not preserved
via gimple_call_fntype streaming (and also cannot be set for indirect calls).

Sth for stmt fixup similar as we handle noreturn?


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

* [Bug lto/60721] xcoral fails to build with LTO: internal compiler error: verify_flow_info failed
  2014-03-31 13:41 [Bug lto/60721] New: xcoral fails to build with LTO: internal compiler error: verify_flow_info failed rguenth at gcc dot gnu.org
  2014-03-31 13:50 ` [Bug lto/60721] " rguenth at gcc dot gnu.org
@ 2014-04-01 11:21 ` rguenth at gcc dot gnu.org
  2014-04-01 11:53 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-04-01 11:21 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-04-01
     Ever confirmed|0                           |1

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Reduced testcase:

> cat t1.i
extern char *getenv (const char *);
int main ()
{
  getenv("");
}
> cat t2.c
#include <setjmp.h>
extern char *getenv (const char *) __attribute__ ((__leaf__));
int init_smac()
{
  jmp_buf come_back;
  getenv("");
  return setjmp (come_back);
}
> ./xgcc -B. t1.i t2.c -flto
t2.c: In function 'init_smac':
t2.c:3:5: error: control flow in the middle of basic block 2
 int init_smac()
     ^
t2.c:3:5: error: control flow in the middle of basic block 2
t2.c:3:5: internal compiler error: verify_flow_info failed


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

* [Bug lto/60721] xcoral fails to build with LTO: internal compiler error: verify_flow_info failed
  2014-03-31 13:41 [Bug lto/60721] New: xcoral fails to build with LTO: internal compiler error: verify_flow_info failed rguenth at gcc dot gnu.org
  2014-03-31 13:50 ` [Bug lto/60721] " rguenth at gcc dot gnu.org
  2014-04-01 11:21 ` rguenth at gcc dot gnu.org
@ 2014-04-01 11:53 ` rguenth at gcc dot gnu.org
  2014-04-01 12:24 ` jamborm at gcc dot gnu.org
  2014-04-01 12:29 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-04-01 11:53 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 32512
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32512&action=edit
patch

Fixed for example with the following.


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

* [Bug lto/60721] xcoral fails to build with LTO: internal compiler error: verify_flow_info failed
  2014-03-31 13:41 [Bug lto/60721] New: xcoral fails to build with LTO: internal compiler error: verify_flow_info failed rguenth at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-04-01 11:53 ` rguenth at gcc dot gnu.org
@ 2014-04-01 12:24 ` jamborm at gcc dot gnu.org
  2014-04-01 12:29 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jamborm at gcc dot gnu.org @ 2014-04-01 12:24 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu.org

--- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> ---
This is a duplicate of PR 60449.  I'm not sure which one we want to
close as a duplicate though.  In that PR 60449 comment 6, Richi wrote:

"OTOH, why do we have to merge the decls/cgraph nodes at all?  Can't we simply
make them aliases if tree merging decides the decls are not equal?"

which might also be a nice fix.


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

* [Bug lto/60721] xcoral fails to build with LTO: internal compiler error: verify_flow_info failed
  2014-03-31 13:41 [Bug lto/60721] New: xcoral fails to build with LTO: internal compiler error: verify_flow_info failed rguenth at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-04-01 12:24 ` jamborm at gcc dot gnu.org
@ 2014-04-01 12:29 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-04-01 12:29 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Dup.

*** This bug has been marked as a duplicate of bug 60449 ***


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

end of thread, other threads:[~2014-04-01 12:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-31 13:41 [Bug lto/60721] New: xcoral fails to build with LTO: internal compiler error: verify_flow_info failed rguenth at gcc dot gnu.org
2014-03-31 13:50 ` [Bug lto/60721] " rguenth at gcc dot gnu.org
2014-04-01 11:21 ` rguenth at gcc dot gnu.org
2014-04-01 11:53 ` rguenth at gcc dot gnu.org
2014-04-01 12:24 ` jamborm at gcc dot gnu.org
2014-04-01 12:29 ` rguenth 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).