[Bug jit/82846] [8 regression] jit.dg test-alignment.c.exe, test-combination.c.exe, test-threads.c.exe fails

2018-01-25 Thread andrey.y.guskov at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82846

Andrey Guskov  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Andrey Guskov  ---
It does. All relevant tests now pass:

gcc/testsuite/jit.dg/jit.exp::test-alignment.c.exe
gcc/testsuite/jit.dg/jit.exp::test-alignment.cc.exe
gcc/testsuite/jit.dg/jit.exp::test-combination.c.exe
gcc/testsuite/jit.dg/jit.exp::test-threads.c.exe
gcc/testsuite/jit.dg/jit.exp::test-threads.c.exe:

[Bug jit/82846] [8 regression] jit.dg test-alignment.c.exe, test-combination.c.exe, test-threads.c.exe fails

2018-01-24 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82846

David Malcolm  changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #6 from David Malcolm  ---
Does r257037 fix this for you?  Thanks.

[Bug jit/82846] [8 regression] jit.dg test-alignment.c.exe, test-combination.c.exe, test-threads.c.exe fails

2018-01-24 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82846

--- Comment #5 from David Malcolm  ---
Author: dmalcolm
Date: Thu Jan 25 00:45:51 2018
New Revision: 257037

URL: https://gcc.gnu.org/viewcvs?rev=257037=gcc=rev
Log:
Fix jit.dg/test-alignment* (PR jit/82846)

These testcases jit-compile functions that return char, but
were erroneously calling them as if they returned int.

This led to errors for certain target configurations (e.g.
reading from %eax (32-bit) in the harness when only %al (8-bit)
had been written to in the jit-compiled function).

gcc/testsuite/ChangeLog:
PR jit/82846
* jit.dg/test-alignment.c (create_aligned_code): Fix return type
of "fn_type" typedef.
* jit.dg/test-alignment.cc (verify_aligned_code): Likewise.


Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/jit.dg/test-alignment.c
trunk/gcc/testsuite/jit.dg/test-alignment.cc

[Bug jit/82846] [8 regression] jit.dg test-alignment.c.exe, test-combination.c.exe, test-threads.c.exe fails

2018-01-24 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82846

David Malcolm  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-01-24
 Ever confirmed|0   |1

--- Comment #4 from David Malcolm  ---
It's a bug in the testcases; am testing a fix now.

[Bug jit/82846] [8 regression] jit.dg test-alignment.c.exe, test-combination.c.exe, test-threads.c.exe fails

2017-11-30 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82846

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug jit/82846] [8 regression] jit.dg test-alignment.c.exe, test-combination.c.exe, test-threads.c.exe fails

2017-11-09 Thread andrey.y.guskov at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82846

--- Comment #3 from Andrey Guskov  ---
No, the patch you mentioned does not fix the issue.
The output I get is listed here:

.file   "fake.c"
.text
.Ltext0:
.p2align 4,,15
.globl  test_aligned_reading_s2
.type   test_aligned_reading_s2, @function
test_aligned_reading_s2:
.LFB0:
.cfi_startproc
.LVL0:
movb(%rdi), %al
mulb2(%rdi)
ret
.cfi_endproc
.LFE0:
.size   test_aligned_reading_s2, .-test_aligned_reading_s2
.p2align 4,,15
.globl  test_aligned_writing_s2
.type   test_aligned_writing_s2, @function
test_aligned_writing_s2:
.LFB1:
.cfi_startproc
.LVL1:
movb$5, (%rdi)
movb$7, 2(%rdi)
jmp test_aligned_reading_s2@PLT
.LVL2:
.cfi_endproc
.LFE1:
.size   test_aligned_writing_s2, .-test_aligned_writing_s2
.p2align 4,,15
.globl  test_aligned_reading_s4
.type   test_aligned_reading_s4, @function

[Bug jit/82846] [8 regression] jit.dg test-alignment.c.exe, test-combination.c.exe, test-threads.c.exe fails

2017-11-06 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82846

--- Comment #2 from David Malcolm  ---
Works for me; I wasn't able to reproduce.

Does the fix for PR jit/82826 (r254458) help?

If I add this to set_options in harness.h:

  gcc_jit_context_set_bool_option (
ctxt,
GCC_JIT_BOOL_OPTION_DUMP_GENERATED_CODE,
1);

it dumps the generated code.

Rerunning using:

  make check-jit RUNTESTFLAGS="-v -v -v jit.exp=test-alignment.c"

I get the following for test_aligned_reading_s2 and test_aligned_writing_s2:

.Ltext0:
.p2align 4,,15
.globl  test_aligned_reading_s2
.type   test_aligned_reading_s2, @function
test_aligned_reading_s2:
.LFB56:
.cfi_startproc
.LVL0:
movzbl  (%rdi), %eax
mulb2(%rdi)
ret
.cfi_endproc
.LFE56:
.size   test_aligned_reading_s2, .-test_aligned_reading_s2
.p2align 4,,15
.globl  test_aligned_writing_s2
.type   test_aligned_writing_s2, @function
test_aligned_writing_s2:
.LFB57:
.cfi_startproc
.LVL1:
movb$5, (%rdi)
movb$7, 2(%rdi)
jmp test_aligned_reading_s2@PLT

for the "_s2" case.

What do you get?  Thanks.

[Bug jit/82846] [8 regression] jit.dg test-alignment.c.exe, test-combination.c.exe, test-threads.c.exe fails

2017-11-06 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82846

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug jit/82846] [8 regression] jit.dg test-alignment.c.exe, test-combination.c.exe, test-threads.c.exe fails

2017-11-05 Thread andrey.y.guskov at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82846

--- Comment #1 from Andrey Guskov  ---
Also affects test-alignment.cc.exe:

NOTE: test-alignment.cc.exe iteration 1 of 5: writing reproducer to
./test-alignment.cc.exe.reproducer.c
PASSED: test-alignment.cc.exe iteration 1 of 5: verify_aligned_code:
result is non-null
PASSED: test-alignment.cc.exe iteration 1 of 5: verify_aligned_code:
test_writing is non-null
FAILED: test-alignment.cc.exe iteration 1 of 5: verify_aligned_code:
actual: test_writing () != expected: 35
incorrect value
PASS:  test-alignment.cc.exe iteration 1 of 5: verify_aligned_code: result is
non-null
PASS:  test-alignment.cc.exe iteration 1 of 5: verify_aligned_code:
test_writing is non-null
FAIL:  test-alignment.cc.exe iteration 1 of 5: verify_aligned_code: actual:
test_writing () != expected: 35
FAIL: test-alignment.cc.exe killed: 45660 exp9 0 0 CHILDKILLED SIGABRT SIGABRT