public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/63307] New: [4.9/5 Regression] Cilk+ breaks -fcompare-debug bootstrap
@ 2014-09-19 10:01 jakub at gcc dot gnu.org
  2014-09-22 10:26 ` [Bug c/63307] " rguenth at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-19 10:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63307

            Bug ID: 63307
           Summary: [4.9/5 Regression] Cilk+ breaks -fcompare-debug
                    bootstrap
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
                CC: izamyatin at gmail dot com, kyukhin at gcc dot gnu.org

I've just tried a -fcompare-debug bootstrap, and one of the two reasons (other
was Ada) that it failed is Cilk+:
../configure --enable-languages=all,ada,obj-c++,lto,go
--enable-checking=release; GCC_COMPARE_DEBUG=1 make -j48 bootstrap > LOG 2>&1
&& GCC_COMPARE_DEBUG=1 make -j48 -k check > LOGC 2>&1; ../contrib/test_summary
> LOGT 2>&1
...
xg++: error: ../../../libcilkrts/runtime/cilk-abi-cilk-for.cpp: -fcompare-debug
failure (length)

>From what I can see, the bug is (at least) in c-family/cilk.c, where it seems
in all 4 traverse handlers on decl_map it creates decls, adds fields etc.

That is a big NO NO in GCC, hash table traversal order should never affect code
generation.  So, seeing changes like:
-          _cilk_spn_1 (low, grain, mid, body, loop_root_pedigree, data, w);
+          _cilk_spn_1 (data, body, loop_root_pedigree, w, mid, low, grain);
or:
-<built-in> (unsigned int D.3190, int D.3189, unsigned int D.3188, void
(*<T39b>) (void *, unsigned int, unsigned int) D.3187, struct
__cilkrts_pedigree * D.3186, void * D.3185, struct __cilkrts_worker * D.3184)
+<built-in> (void * D.3190, void (*<T39b>) (void *, unsigned int, unsigned int)
D.3189, struct __cilkrts_pedigree * D.3188, struct __cilkrts_worker * D.3187,
unsigned int D.3186, unsigned int D.3185, int D.3184)
in *.gimple dump between -g and -g0 is just wrong (and in this case it isn't
really debug related, just different order in the hash map).

If you don't have the decls (but, apparently you put also BLOCKs in there, what
else?) you want to traverse in some other data structure, you can e.g. traverse
the hash table but only collect the decls (do you need anything else, e.g. the
BLOCKs?, types, etc.) you saw into some vector, then qsort the vector (for
decls e.g. by DECL_UID, if you have also other trees, it might be harder) and
then traverse the sorted vector insert of traversing random order hash map.


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

end of thread, other threads:[~2015-06-26 20:31 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-19 10:01 [Bug c/63307] New: [4.9/5 Regression] Cilk+ breaks -fcompare-debug bootstrap jakub at gcc dot gnu.org
2014-09-22 10:26 ` [Bug c/63307] " rguenth at gcc dot gnu.org
2014-09-29  9:28 ` izamyatin at gmail dot com
2014-09-29  9:43 ` jakub at gcc dot gnu.org
2014-09-30 13:21 ` izamyatin at gmail dot com
2014-09-30 13:27 ` jakub at gcc dot gnu.org
2014-10-01 13:20 ` izamyatin at gmail dot com
2014-10-20 16:11 ` iverbin at gcc dot gnu.org
2014-10-20 21:48 ` pinskia at gcc dot gnu.org
2014-10-21  9:29 ` burnus at gcc dot gnu.org
2014-10-30 10:41 ` jakub at gcc dot gnu.org
2014-11-24 13:21 ` rguenth at gcc dot gnu.org
2015-01-21 21:25 ` jakub at gcc dot gnu.org
2015-06-17 13:39 ` [Bug c/63307] [4.9 " jakub at gcc dot gnu.org
2015-06-26 20:01 ` jakub at gcc dot gnu.org
2015-06-26 20:31 ` jakub 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).