OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 305 jeremybenn
// { dg-do run  }
2
// g++ 1.37.1 bug 900520_04
3
 
4
// g++ does not yet support the initialization of scalar type objects
5
// (including built-in arithmetic types, enum types, and pointer types)
6
// via constructor initialization syntax except within a call to operator
7
// new.
8
 
9
// keywords: unimplemented, syntax, initialization, scalar types
10
 
11
enum e_type { e_value };
12
 
13
typedef char *charp;
14
 
15
charp cp;
16
 
17
int global_i (1);                               // { dg-bogus "" }
18
double global_d (9.9);                          // { dg-bogus "" }
19
charp global_cp0 (cp);                          // { dg-bogus "" }
20
charp global_cp1 (0);                           // { dg-bogus "" }
21
enum e_type global_e (e_value);                 // { dg-bogus "" }
22
 
23
void func0 ()
24
{
25
  int local_i (1);                              // { dg-bogus "" }
26
  double local_d (9.9);                         // { dg-bogus "" }
27
  charp local_cp0 (cp);                         // { dg-bogus "" }
28
  charp local_cp1 (0);                          // { dg-bogus "" }
29
  enum e_type local_e (e_value);                // { dg-bogus "" }
30
}
31
 
32
void func1 ()
33
{
34
  int* ip = new int (1);                        // { dg-bogus "" }
35
  double* dp = new double (9.9);                // { dg-bogus "" }
36
  charp* cpp0 = new charp (cp);                 // { dg-bogus "" }
37
  charp* cpp1 = new charp (0);                  // { dg-bogus "" }
38
  enum e_type* ep = new e_type (e_value);       // { dg-bogus "" }
39
}
40
 
41
int main () { return 0; }

powered by: WebSVN 2.1.0

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