Jump to page: 1 2
Thread overview
[Bug 73] ARM: Wrong code with -O2 (heisenbug)
Aug 10, 2013
Johannes Pfau
Aug 10, 2013
Johannes Pfau
Aug 10, 2013
Johannes Pfau
Aug 10, 2013
Johannes Pfau
Aug 10, 2013
Johannes Pfau
Aug 12, 2013
Iain Buclaw
Aug 12, 2013
Iain Buclaw
Aug 13, 2013
Johannes Pfau
Aug 13, 2013
Johannes Pfau
Sep 04, 2013
Johannes Pfau
Jan 12, 2014
Johannes Pfau
August 10, 2013
http://bugzilla.gdcproject.org/show_bug.cgi?id=73

--- Comment #4 from Johannes Pfau <johannespfau@gmail.com> 2013-08-06 13:44:27 UTC ---
Created attachment 46
  --> http://bugzilla.gdcproject.org/attachment.cgi?id=46
dump-rtl-reload output

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
August 10, 2013
http://bugzilla.gdcproject.org/show_bug.cgi?id=73

--- Comment #3 from Johannes Pfau <johannespfau@gmail.com> 2013-08-06 13:43:19 UTC ---
Created attachment 45
  --> http://bugzilla.gdcproject.org/attachment.cgi?id=45
dump-tree-optimized output

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
August 10, 2013
http://bugzilla.gdcproject.org/show_bug.cgi?id=73

--- Comment #5 from Johannes Pfau <johannespfau@gmail.com> 2013-08-06 13:44:52 UTC ---
Created attachment 47
  --> http://bugzilla.gdcproject.org/attachment.cgi?id=47
dump-rtl-postreload output

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
August 10, 2013
http://bugzilla.gdcproject.org/show_bug.cgi?id=73

--- Comment #1 from Johannes Pfau <johannespfau@gmail.com> 2013-08-06 13:41:35 UTC ---
Created attachment 43
  --> http://bugzilla.gdcproject.org/attachment.cgi?id=43
dump-tree-original output

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
August 10, 2013
http://bugzilla.gdcproject.org/show_bug.cgi?id=73

--- Comment #2 from Johannes Pfau <johannespfau@gmail.com> 2013-08-06 13:42:24 UTC ---
Created attachment 44
  --> http://bugzilla.gdcproject.org/attachment.cgi?id=44
dump-tree-gimple output

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
August 12, 2013
http://bugzilla.gdcproject.org/show_bug.cgi?id=73

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #6 from Iain Buclaw <ibuclaw@gdcproject.org> 2013-08-12 11:00:29 UTC ---
On a completely unrelated note, it's rather ugly that we invoke the GC to allocate memory on null array literals...  Will fix that. :o)

Otherwise thanks for the bug report! I'll get around to testing this on my ARM dev.


Regards
Iain.

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
August 12, 2013
http://bugzilla.gdcproject.org/show_bug.cgi?id=73

--- Comment #7 from Iain Buclaw <ibuclaw@gdcproject.org> 2013-08-12 13:06:37 UTC ---
OK, now codegen is:

;; Function main (_Dmain)
;; enabled by -tree-original

{
  struct Tup1 e;
  struct Tup3 tup22;
  struct Tup2 tup12;
  struct Tup1 tup11;

  (void) (tup11 = at.tup1 (10, 3));
  (void) (tup12 = at.tup2 ({.length=3, .ptr="str"}, {.length=0, .ptr=0B}));
  (void) (tup22 = at.tup3 (tup11, tup12));
  (void) (e = tup22.field1);
  {
    if (tup22.field1.field1 == 10 && tup22.field1.field2 == 3)
      {
        {

        }
      }
    else
      {
        {
          if (0)
            {
              0
            }
          else
            {
              _d_assert ({.length=6, .ptr="test.d"}, 48);
            }
        }
      }
  }
  return <retval> = 0;
}

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
August 13, 2013
http://bugzilla.gdcproject.org/show_bug.cgi?id=73

--- Comment #8 from Johannes Pfau <johannespfau@gmail.com> 2013-08-13 15:15:29 UTC ---
That code looks much better now :-)

I've been working on ARM support recently and I'll push my changes soon. I mainly implemented missing ASM in the compiler test suite and added missing definitions for phobos and druntime.

There are only two failing test cases left on ARM. Both are optimization bugs likely caused by this issue. I'll attach another test case which was reduced from the failing test suite case.

It looks like my initial guess was wrong and this is not a backend bug. Bug #74 seems to be related to this issue as well. It seems the only thing common to all three test cases is the use of array literals so the bug could be in array codegen (or typeinfo codegen). It's also always some sort of memory/stack corruption so it could be related to wrong size or offset information at some point.

Phobos needs a little more work, but not much. Unit tests build and most of them run fine.

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
August 13, 2013
http://bugzilla.gdcproject.org/show_bug.cgi?id=73

--- Comment #9 from Johannes Pfau <johannespfau@gmail.com> 2013-08-13 15:16:09 UTC ---
Created attachment 49
  --> http://bugzilla.gdcproject.org/attachment.cgi?id=49
test case 2

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
September 04, 2013
http://bugzilla.gdcproject.org/show_bug.cgi?id=73

--- Comment #10 from Johannes Pfau <johannespfau@gmail.com> 2013-09-04 08:07:36 UTC ---
A small update: git-bisect shows that we actually have two different bugs and both are regressions.

The first bug is triggered when compiling runnable/aliasthis.d in the testsuite. It first appeared in commit 58f03823aeb72109a69673f111092548aca081f5 (Bug 57 - Comparing small structs fails.). Reverting this commit also fixes this bug on HEAD.

The second bug is triggered when compiling runnable/test15.d. The issue first appeared between d3d1364f9cd790dc5d2516eaf7365f361da75b0d (GOOD) and 3dec2d29bb02fa084b0506a493bfa43c89d08ca4 (BAD). It seems to be a regression caused by the switch to the new toDt implementations. I'll see if I can track this down to the exact commit.

-- 
Configure bugmail: http://bugzilla.gdcproject.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
« First   ‹ Prev
1 2