public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: malakhov@mcst.ru (Ilya Yu. Malakhov)
To: libffi-discuss@sourceware.org
Subject: Non-matching `dg-output's in testsuite/libffi.complex/cls_align_complex.inc have no effect
Date: Thu, 29 Apr 2021 18:57:46 +0300	[thread overview]
Message-ID: <wfcv9855bid.fsf@gudgeon.lab.sun.mcst.ru> (raw)

 Because the default precision of `printf ("%f")'s in
testsuite/libffi.complex/cls_align_complex.inc is 6, it would be reasonable to
fix the related `dg-output's as proposed below if they affected the results of
libffi.complex/cls_align_complex_{{,long}double,float}.c tests including this
header at all.

 The reason for why they have no effect is that DejaGnu's `proc dg-get-options'
responsible for picking out the dg-xxx options in a testcase just greps
unpreprocessed .c files. Therefore, no output pattern checks are actually done
in these tests.

 The latter issue also applies to matching `dg-output's in
testsuite/libffi.complex/cls_complex_struct.inc.

diff --git a/testsuite/libffi.complex/cls_align_complex.inc b/testsuite/libffi.complex/cls_align_complex.inc
index 4a812ed..23d87bf 100644
--- a/testsuite/libffi.complex/cls_align_complex.inc
+++ b/testsuite/libffi.complex/cls_align_complex.inc
@@ -74,18 +74,18 @@ int main (void)
   args_c[2] = NULL;
 
   ffi_call(&cif, FFI_FN(cls_struct_align_fn), &res_c, args_c);
-  /* { dg-output "12 4951,7i 127 1 9320,1i 13: 13 14271,8i 140" } */
+  /* { dg-output "12 4951.000000,7.000000i 127 1 9320.000000,1.000000i 13: 13 14271.000000,8.000000i 140" } */
   printf("res: %d %f,%fi %d\n",
 	 res_c.a, T_CONV  creal (res_c.b), T_CONV  cimag (res_c.b), res_c.c);
-  /* { dg-output "\nres: 13 14271,8i 140" } */
+  /* { dg-output "\nres: 13 14271.000000,8.000000i 140" } */
 
   CHECK(ffi_prep_closure_loc(pcl, &cif, cls_struct_align_gn, NULL, code) == FFI_OK);
 
   res_c = ((cls_struct_align(*)(cls_struct_align, cls_struct_align))(code))(g_c, f_c);
-  /* { dg-output "\n12 4951,7i 127 1 9320,1i 13: 13 14271,8i 140" } */
+  /* { dg-output "\n12 4951.000000,7.000000i 127 1 9320.000000,1.000000i 13: 13 14271.000000,8.000000i 140" } */
   printf("res: %d %f,%fi %d\n",
 	 res_c.a, T_CONV  creal (res_c.b), T_CONV  cimag (res_c.b), res_c.c);
-  /* { dg-output "\nres: 13 14271,8i 140" } */
+  /* { dg-output "\nres: 13 14271.000000,8.000000i 140" } */
 
   exit(0);
 }

                 reply	other threads:[~2021-04-29 15:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wfcv9855bid.fsf@gudgeon.lab.sun.mcst.ru \
    --to=malakhov@mcst.ru \
    --cc=libffi-discuss@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).