public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/43631]  New: var-tracking inserts notes with non-NULL BLOCK_FOR_INSN in between basic blocks
@ 2010-04-02 15:25 steven at gcc dot gnu dot org
  2010-07-17 22:56 ` [Bug middle-end/43631] " steven at gcc dot gnu dot org
  0 siblings, 1 reply; 27+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-04-02 15:25 UTC (permalink / raw)
  To: gcc-bugs

Seen on ia64-unknown-linux, but probably reproducible elsewhere, also:

$ cat t.c
typedef unsigned int UDItype __attribute__ ((mode (DI)));
typedef int TItype __attribute__ ((mode (TI)));

struct DWstruct {UDItype low, high;};
typedef union
{
  struct DWstruct s;
  TItype ll;
} DWunion;

TItype
__multi3 (TItype u, TItype v)
{
  const DWunion uu = {.ll = u};
  const DWunion vv = {.ll = v};
  DWunion w = {.ll = ({DWunion __w; __asm__ ("xma.hu %0 = %2, %3, f0\n\txma.l
%1 = %2, %3, f0" : "=&f" (__w.s.high), "=f" (__w.s.low) : "f" (uu.s.low), "f"
(vv.s.low)); __w.ll; })};
  w.s.high += (uu.s.low * vv.s.high + uu.s.high * vv.s.low);
  return w.ll;
}
$ ./cc1 -quiet -g -O2 t.c
t.c: In function '__multi3':
t.c:19:1: error: insn 111 outside of basic blocks has non-NULL bb field
t.c:19:1: error: insn 110 outside of basic blocks has non-NULL bb field
t.c:19: confused by earlier errors, bailing out


Needs a patch to var-tracking.c to expose the problem:
Index: var-tracking.c
===================================================================
--- var-tracking.c      (revision 157942)
+++ var-tracking.c      (working copy)
@@ -115,6 +115,8 @@
 #include "pointer-set.h"
 #include "recog.h"

+#undef ENABLE_CHECKING
+#define ENABLE_CHECKING 1
 /* var-tracking.c assumes that tree code with the same value as VALUE rtx code
    has no chance to appear in REG_EXPR/MEM_EXPRs and isn't a decl.
    Currently the value is the same as IDENTIFIER_NODE, which has such
@@ -8489,6 +8491,7 @@ variable_tracking_main (void)

   flag_var_tracking_assignments = save;

+  verify_flow_info ();
   return ret;
 }


This comes from emit_notes_for_differences. I have no idea what the purpose is
of the notes between basic blocks. Apparently the CFG has to be frozen at this
point, or the notes make no sense to begin with. But it's also not clear to me
where the notes should be emitted.

Help sought from a VTA guy, i.e. Jakub or Alexandre :-)


-- 
           Summary: var-tracking inserts notes with non-NULL BLOCK_FOR_INSN
                    in between basic blocks
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: wrong-debug
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steven at gcc dot gnu dot org


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


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

end of thread, other threads:[~2015-02-01 21:56 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-43631-4@http.gcc.gnu.org/bugzilla/>
2010-12-17 21:43 ` [Bug middle-end/43631] var-tracking inserts notes with non-NULL BLOCK_FOR_INSN in between basic blocks steven at gcc dot gnu.org
2011-03-28 17:45 ` steven at gcc dot gnu.org
2012-03-17  0:38 ` steven at gcc dot gnu.org
2012-11-13 10:50 ` jakub at gcc dot gnu.org
2012-11-13 23:39 ` steven at gcc dot gnu.org
2012-12-06 14:38 ` jakub at gcc dot gnu.org
2012-12-06 14:47 ` jakub at gcc dot gnu.org
2012-12-07 10:12 ` izamyatin at gmail dot com
2012-12-07 10:17 ` stevenb.gcc at gmail dot com
2012-12-07 10:22 ` jakub at gcc dot gnu.org
2012-12-07 10:24 ` izamyatin at gmail dot com
2012-12-07 10:30 ` jakub at gcc dot gnu.org
2012-12-07 11:59 ` steven at gcc dot gnu.org
2012-12-07 12:12 ` jakub at gcc dot gnu.org
2012-12-07 12:47 ` ubizjak at gmail dot com
2012-12-10  8:03 ` izamyatin at gmail dot com
2012-12-11 10:42 ` jakub at gcc dot gnu.org
2012-12-11 10:49 ` jakub at gcc dot gnu.org
2012-12-12  9:56 ` jakub at gcc dot gnu.org
2012-12-12 10:01 ` jakub at gcc dot gnu.org
2012-12-17  8:48 ` ubizjak at gmail dot com
2013-04-03 20:30 ` steven at gcc dot gnu.org
2013-04-06 12:39 ` steven at gcc dot gnu.org
2013-04-16 20:12 ` steven at gcc dot gnu.org
2015-01-20 15:33 ` ubizjak at gmail dot com
2015-02-01 21:56 ` jakub at gcc dot gnu.org
2010-04-02 15:25 [Bug middle-end/43631] New: " steven at gcc dot gnu dot org
2010-07-17 22:56 ` [Bug middle-end/43631] " steven at gcc dot gnu dot 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).