Fwd: [Lto-team] Fwd: [tuples] reduced testcase of the libjava build failure
Doug Kwan (關振德)
dougkwan@google.com
Fri May 2 01:58:00 GMT 2008
---------- Forwarded message ----------
From: Doug Kwan (關振德) <dougkwan@google.com>
Date: 2008/5/1
Subject: Re: [Lto-team] Fwd: [tuples] reduced testcase of the libjava
build failure
To: Rafael Espindola <espindola@google.com>
副本: lto-team <lto-team@google.com>
The test case fails because we find a basic block with 3 out-going
edges in gimple_verify_flow_info:
if (!true_edge
|| !false_edge
|| !(true_edge->flags & EDGE_TRUE_VALUE)
|| !(false_edge->flags & EDGE_FALSE_VALUE)
|| (true_edge->flags & (EDGE_FALLTHRU | EDGE_ABNORMAL))
|| (false_edge->flags & (EDGE_FALLTHRU | EDGE_ABNORMAL))
|| EDGE_COUNT (bb->succs) >= 3)
{
error ("wrong outgoing edge flags at end of bb %d",
bb->index);
err = 1;
}
The offend bb ends with a statement like
if (a <= b) ...
where a & b are floating point values. With -fnon-call-exceptions,
floating point comparison is considered trapping so it make sense for
the bb to have a third exception edge.
The test-case does not fail with TOT compiled with --enable-checking.
I looked at that and found that tree_could_trap_p is broken in two
levels. First, it does not handle COND_EXPR specially. It just looked
at the TREE_TYPE for COND_EXPR (void_type_node) to compute
fp_operation. I added a code to recurse with the condition in
COND_EXPR and it was still broken. The reason is that it uses the
type of a comparison tree (boolean_type_node) to compute the flag
fp_operation. Finally I fixed that and I got the same ICE as in the
tuple branch.
I guess --enable-checking=yes and -fnon-call-exceptions do not got
together to make the bugs detectable. I will try relaxing the test in
gimple_verify_flow_info to allow for a third exception edge and see
how things goes.
-Doug
2008/5/1 Rafael Espindola <espindola@google.com>:
> ---------- Forwarded message ----------
> From: Rafael Espindola <espindola@google.com>
> Date: 2008/5/1
> Subject: [tuples] reduced testcase of the libjava build failure
> To: gcc-patches <gcc-patches@gcc.gnu.org>
>
>
> I will try to fix it tomorrow, but it would be great if someone could
> to give it a try today :-)
>
> To reproduce:
>
> ./cc1plus testcase.ii -O1 -fnon-call-exceptions -quiet
>
> testcase.ii: In function 'void run()':
> testcase.ii:8: error: wrong outgoing edge flags at end of bb 2
> testcase.ii:8: internal compiler error: verify_flow_info failed
>
> Cheers,
> --
> Rafael Avila de Espindola
>
> Google Ireland Ltd.
> Gordon House
> Barrow Street
> Dublin 4
> Ireland
>
> Registered in Dublin, Ireland
> Registration Number: 368047
>
>
>
> --
> Rafael Avila de Espindola
>
> Google Ireland Ltd.
> Gordon House
> Barrow Street
> Dublin 4
> Ireland
>
> Registered in Dublin, Ireland
> Registration Number: 368047
>
> _______________________________________________
> Lto-team mailing list
> Lto-team@google.com
> https://mailman.corp.google.com/mailman/listinfo/lto-team
>
>
More information about the Gcc-patches
mailing list