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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.benjamin/] [15756-1.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do assemble  }
2
// { dg-options "-Wsign-promo" }
3
// 981203 bkoz
4
// g++/15756  test1
5
 
6
enum e_value { first = 0, next = 30 };
7
 
8
struct sanjuan {
9
  sanjuan(int value);
10
  sanjuan(unsigned value);
11
  friend sanjuan operator&(const sanjuan& x, const sanjuan& y);
12
  friend int operator!=(const sanjuan& x, const sanjuan& y);
13
};
14
 
15
extern void mod_enum(e_value*);
16
extern int a;
17
 
18
void foo(void) {
19
  e_value mod = first;
20
  mod_enum(&mod);
21
  if (mod != next)
22
    ++a;
23
}
24
 
25
 
26
 
27
 
28
 
29
 
30
 
31
 
32
 
33
 
34
 
35
 
36
 

powered by: WebSVN 2.1.0

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