public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/66332] New: goacc/acc_on_device-2.c scan-rtl-dump-times expand testsuite failure
@ 2015-05-29  1:46 jpsinthemix at verizon dot net
  2015-05-29  5:41 ` [Bug middle-end/66332] " tschwinge at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jpsinthemix at verizon dot net @ 2015-05-29  1:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66332
           Summary: goacc/acc_on_device-2.c scan-rtl-dump-times expand
                    testsuite failure
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: jpsinthemix at verizon dot net
                CC: cmang at google dot com
  Target Milestone: ---

Hi,

I'm getting the following openacc-related testsuite error for gcc-5.1.0 on an
x86_64-pc-linux-gnu system:

FAIL: c-c++-common/goacc/acc_on_device-2.c scan-rtl-dump-times expand "\\(call
[^\\n]* acc_on_device" 0

This failure does not appear to be related to BUG 64850.

The failure occurs in
gcc-5.1.0/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c:27

  1 /* Have to enable optimizations, as otherwise builtins won't be expanded. 
*/
  2 /* { dg-additional-options "-O -fdump-rtl-expand" } */
  3 
  4 #if __cplusplus
  5 extern "C" {
  6 #endif
  7 
  8 typedef enum acc_device_t { acc_device_X = 123 } acc_device_t;
  9 extern int acc_on_device (acc_device_t);
 10 
 11 #if __cplusplus
 12 }
 13 #endif
 14 
 15 int
 16 f (void)
 17 {
 18   const acc_device_t dev = acc_device_X;
 19   return acc_on_device (dev);
 20 }
 21 
 22 /* With -fopenacc, we're expecting the builtin to be expanded, so no calls.
 23    TODO: in C++, even under extern "C", the use of enum for acc_device_t
 24    perturbs expansion as a builtin, which expects an int parameter.  It's
fine
 25    when changing acc_device_t to plain int, but that's not what we're doing
in
 26    <openacc.h>.
 27    { dg-final { scan-rtl-dump-times "\\\(call \[^\\n\]* acc_on_device" 0
"expand" { xfail c++ } } } */
 28
 29 /* { dg-final { cleanup-rtl-dump "expand" } } */

Running:

/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/build/gcc/xgcc
-B/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/build/gcc/
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -fopenacc -O
-fdump-rtl-expand -ffat-lto-objects -S -o acc_on_device-2.s

I get (acc_on_device-2.s):

  1         .file   "acc_on_device-2.c"
  2         .text
  3         .globl  f
  4         .type   f, @function
  5 f:
  6 .LFB0:
  7         .cfi_startproc
  8         subq    $8, %rsp
  9         .cfi_def_cfa_offset 16
 10         movl    $123, %edi
 11         call    acc_on_device
 12         addq    $8, %rsp
 13         .cfi_def_cfa_offset 8
 14         ret
 15         .cfi_endproc
 16 .LFE0:
 17         .size   f, .-f
 18         .ident  "GCC: (GNU) 5.1.0"
 19         .section        .note.GNU-stack,"",@progbits

and (acc_on_device-2.c.191r.expand):

  1
  2 ;; Function f (f, funcdef_no=0, decl_uid=1846, cgraph_uid=0,
symbol_order=0)
  3
  4
  5 ;; Generating RTL for gimple basic block 2
  6
  7
  8 try_optimize_cfg iteration 1
  9
 10 Merging block 3 into block 2...
 11 Merged blocks 2 and 3.
 12 Merged 2 and 3 without moving.
 13 Removing jump 11.
 14 Merging block 4 into block 2...
 15 Merged blocks 2 and 4.
 16 Merged 2 and 4 without moving.
 17
 18
 19 try_optimize_cfg iteration 2
 20
 21
 22
 23 ;;
 24 ;; Full RTL generated for this function:
 25 ;;
 26 (note 1 0 3 NOTE_INSN_DELETED)
 27 (note 3 1 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
 28 (note 2 3 5 2 NOTE_INSN_FUNCTION_BEG)
 29 (insn 5 2 6 2 (set (reg:SI 5 di)
 30         (const_int 123 [0x7b]))
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c:19
-1
 31      (nil))
 32 (call_insn/u 6 5 7 2 (set (reg:SI 0 ax)
 33         (call (mem:QI (symbol_ref:DI ("acc_on_device") [flags 0x41] 
<function_decl 0x7f1eaf74b870 acc_on_device>) [0 __builtin_acc_on_device S1
A8])
 34             (const_int 0 [0])))
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c:19
-1
 35      (expr_list:REG_EH_REGION (const_int 0 [0])
 36         (nil))
 37     (expr_list:SI (use (reg:SI 5 di))
 38         (nil)))
 39 (insn 7 6 8 2 (set (reg:SI 89)
 40         (reg:SI 0 ax))
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c:19
-1
 41      (nil))
 42 (insn 8 7 9 2 (set (reg:SI 90)
 43         (reg:SI 89))
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c:19
-1
 44      (nil))
 45 (insn 9 8 10 2 (set (reg:SI 87 [ D.1855 ])
 46         (reg:SI 90))
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c:19
-1
 47      (nil))
 48 (insn 10 9 14 2 (set (reg:SI 88 [ <retval> ])
 49         (reg:SI 87 [ D.1855 ]))
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c:19
-1
 50      (nil))
 51 (insn 14 10 15 2 (set (reg/i:SI 0 ax)
 52         (reg:SI 88 [ <retval> ]))
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c:20
-1
 53      (nil))
 54 (insn 15 14 0 2 (use (reg/i:SI 0 ax))
/home/pkgbase/bld/gcc.5.1.0-x86_64-build4/gcc-5.1.0/gcc/testsuite/c-c++-common/goacc/acc_on_device-2.c:20
-1
 55      (nil))

The test fails because the "(call .." regexp should not occur with -fopenacc
(the '0' argument to scan-rtl-dump-times at acc_on_device-2.c:27), but it is
apparently detected on at acc_on_device-2.c.191r.expand:33.

Unfortunately, I haven't the slightest idea about what is going on with this
test, but am wondering if it is serious or not.


thanks much for your time and work,
John Stanley


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

end of thread, other threads:[~2015-09-10 15:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-29  1:46 [Bug go/66332] New: goacc/acc_on_device-2.c scan-rtl-dump-times expand testsuite failure jpsinthemix at verizon dot net
2015-05-29  5:41 ` [Bug middle-end/66332] " tschwinge at gcc dot gnu.org
2015-06-02 11:49 ` tschwinge at gcc dot gnu.org
2015-06-02 12:05 ` tschwinge at gcc dot gnu.org
2015-07-15 11:55 ` tschwinge at gcc dot gnu.org
2015-07-31 14:14 ` tschwinge at gcc dot gnu.org
2015-08-10 16:49 ` tschwinge at gcc dot gnu.org
2015-09-10 15:58 ` sje 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).