OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [warn/] [skip-2.C] - Rev 717

Go to most recent revision | Compare with Previous | Blame | View Log

// { dg-do compile }
// { dg-options "-Wall" }

extern int f2(int);
extern void f3();
void
f1(int i)
{
  if (1 == 1 || f2(i >> -10))
    f3();
  if (1 == 1 || f2(i >> 128))
    f3();
  if (1 == 1 || f2(i << -10))
    f3();
  if (1 == 1 || f2(i << 128))
    f3();
  if (1 == 1 || i < 0xffffffff)
    f3();
  if (1 == 1 || i >= -0x80000000)
    f3();
  if (1 == 0 && f2(i >> -10))
    f3();
  if (1 == 0 && f2(i >> 128))
    f3();
  if (1 == 0 && f2(i << -10))
    f3();
  if (1 == 0 && f2(i << 128))
    f3();
  if (1 == 0 && i < 0xffffffff)
    f3();
  if (1 == 0 && i >= -0x80000000)
    f3();
  if (1 == 1 && f2(i >> -10))   /* { dg-warning "shift count is negative" } */
    f3();
  if (1 == 0 || f2(i << -10))   /* { dg-warning "shift count is negative" } */
    f3();
}

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.