<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - New GVN causes a failure in some lnt tests on PowerPC"
   href="https://llvm.org/bugs/show_bug.cgi?id=31483">31483</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>New GVN causes a failure in some lnt tests on PowerPC
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Scalar Optimizations
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nemanja.i.ibm@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following has been reduced by creduce from
projects/test-suite/SingleSource/UnitTests/2003-08-11-VaListArg.c

#include <stdarg.h>
test(char *fmt, va_list ap) {
  char *s;
  while (*fmt)
    switch (*fmt++) {
    case 's':
      s = va_arg(ap, char *);
      printf("string %s\n", s);
      break;
    case 'i':
    case 'c':
      va_arg(ap, int);
    }
  va_end(ap);
}

testVaListArg(*fmt, ...) {
  va_list ap;
  va_start(ap, fmt);
  test(fmt, ap);
}

main() {
  testVaListArg("ssiciiiiis", "", "def", 3, 'a', 3, 6, 7, 8, 9, "10 args
done");
}

That is one of the test cases that fails with -mllvm -new-gvn.
The complete command line to build it is:

clang -I $LNT_BUILD_DIR/SingleSource/UnitTests -I
$LLVM_SRC/projects/test-suite/SingleSource/UnitTests -I
$LLVM_SRC/projects/test-suite/include -I../../include -D_GNU_SOURCE
-D__STDC_LIMIT_MACROS -DNDEBUG  -O3 -mllvm -enable-newgvn -ffp-contract=off
-ffp-contract=off -fomit-frame-pointer 2003-08-11-VaListArg.c

I understand that access to a PPC machine is sometimes tricky to get so if this
is somehow unique to PPC, I'm happy to assist with providing further
information.

This is with revision 290604 of trunk.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>