public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/65824] [6 Regression] execution failures for stdarg/va-arg testcases for aarch64
Date: Sun, 26 Apr 2015 09:26:00 -0000	[thread overview]
Message-ID: <bug-65824-4-F6xPQxkfuq@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65824-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from vries at gcc dot gnu.org ---
minimal version of stdarg-1.c, returns 14 if correct, but 12 for current
failure, indicating that the the first and resultless va_arg has been ignored:
...
include <stdarg.h>

extern void exit (int);

int
f6 (int i, ...)
{
  int res;

  va_list ap;
  va_start (ap, i);

  va_arg (ap, long);

  res = va_arg (ap, long);

  va_end (ap);

  return res;
}

int
main (void)
{
  int res = f6 (7, 12L, 14L);
  exit (res);
}
...

The expression returned by gimpify_va_arg_internal is:
...
(gdb) call debug_generic_expr ($1)
*D.2689 >= 0 ? ap.__stack = (void *) ((long int) D.2690 + 15 & -8);, (long int
*) D.2690; : ap.__gr_offs = D.2689 + 8;, ap.__gr_offs > 0 ? ap.__stack = (void
*) ((long int) D.2690 + 15 & -8);, (long int *) D.2690; : (long int *)
ap.__gr_top + (sizetype) D.2689;
...

Indeed, not side-effect free.

This is most likely a duplicate of PR65818.


  parent reply	other threads:[~2015-04-26  9:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21  7:46 [Bug tree-optimization/65824] New: " vries at gcc dot gnu.org
2015-04-21  8:14 ` [Bug tree-optimization/65824] " rguenth at gcc dot gnu.org
2015-04-26  8:19 ` vries at gcc dot gnu.org
2015-04-26  9:26 ` vries at gcc dot gnu.org [this message]
2015-04-26 11:13 ` vries at gcc dot gnu.org

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=bug-65824-4-F6xPQxkfuq@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.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).