This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/38459] [graphite] SEGFAULT in cloog_clast_create



------- Comment #8 from grosser at gcc dot gnu dot org  2008-12-10 08:48 -------
Created an attachment (id=16869)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16869&action=view)
Fix

OK. I got the fix. We had a problem with invalid CloogDomain data structures.

We did not detect all parameters in find_scop_parameters(), but detected some
later during the domain creation. This was wrong, as the domains are always
with the number of parameters in mind created. If this number changes during
domain creation the already created domains are wrong/invalid.

To detect this easier the next time I added an assert in the code path. If we
would add parameters after find_scop_parameters() we simply fail.parameters. 

And why did we not detect all parameters?

Before commit 142384 we had this order:

1. Detect all bbs
2. Detect parameters
3. Remove unnecessary bbs.

Now we have do not even create the bbs in 1. So we do not check all bbs for
parameters and some of the bbs we do not check contained conditions with
parameters.

Solution: Change the way we find parameters in conditions. Do not look in the
bbs for conditions, but directly in GBB_CONDITIONS.

With this fix applied I can compile CP2K with "-O2 -fgraphite" so there are
only backend bugs left.

These will be found with "-O2 -fgraphite-identity"


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]