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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.bugs/] [900520_02.C] - Blame information for rev 749

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

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
// g++ 1.37.1 bug 900520_02
3
 
4
// keywords: reference types, initialization, parameter passing
5
 
6
typedef int b_array[3];
7
typedef int u_array[];
8
 
9
typedef b_array &b_array_ref;
10
typedef u_array &u_array_ref;
11
 
12
void take_b_array_ref (b_array_ref arg) { } // { dg-error "" } passed to here
13
 
14
extern u_array u_array_gbl_obj;
15
 
16
u_array_ref u_array_ref_gbl_obj0 = u_array_gbl_obj;
17
 
18
b_array_ref b_array_ref_gbl_obj0 = u_array_ref_gbl_obj0; // { dg-error "" } invalid declaration
19
 
20
void test_passing ()
21
{
22
  take_b_array_ref (u_array_ref_gbl_obj0); // { dg-error "" } invalid call
23
}
24
 
25
b_array u_array_gbl_obj;
26
 
27
int main () { return 0; }

powered by: WebSVN 2.1.0

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