Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/exceptions/virtual-poly.cfa

    recfd758 rfd54fef  
    88#include <assert.h>
    99
    10 
    11 struct __cfatid_struct_mono_base {
    12     __cfa__parent_vtable const * parent;
    13 };
    14 
    15 __attribute__(( section(".gnu.linkonce.__cfatid_mono_base") ))
    16 struct __cfatid_struct_mono_base __cfatid_mono_base = {
    17     (__cfa__parent_vtable *)0,
    18 };
    19 
    2010struct mono_base_vtable {
    21         __cfatid_struct_mono_base const * const __cfavir_typeid;
     11        mono_base_vtable const * const parent;
    2212};
    2313
     
    2717
    2818forall(T)
    29 struct __cfatid_struct_mono_child {
    30     __cfatid_struct_mono_base const * parent;
    31 };
    32 
    33 forall(T)
    3419struct mono_child_vtable {
    35         __cfatid_struct_mono_child(T) const * const __cfavir_typeid;
     20        mono_base_vtable const * const parent;
    3621};
    3722
     
    4126};
    4227
    43 __cfatid_struct_mono_child(int) __cfatid_mono_child @= {
    44         &__cfatid_mono_base,
    45 };
    46 
     28mono_base_vtable _mono_base_vtable_instance @= { 0 };
    4729mono_child_vtable(int) _mono_child_vtable_instance @= {
    48         &__cfatid_mono_child,
     30        &_mono_base_vtable_instance
    4931};
    5032
     
    5537}
    5638
    57 
    58 forall(U)
    59 struct __cfatid_struct_poly_base {
    60     __cfa__parent_vtable const * parent;
    61 };
    62 
    6339forall(U)
    6440struct poly_base_vtable {
    65         __cfatid_struct_poly_base(U) const * const __cfavir_typeid;
     41        poly_base_vtable(U) const * const parent;
    6642};
    6743
     
    7248
    7349forall(V)
    74 struct __cfatid_struct_poly_child {
    75     __cfatid_struct_poly_base(V) const * parent;
    76 };
    77 
    78 forall(V)
    7950struct poly_child_vtable {
    80         __cfatid_struct_poly_child(V) const * const __cfavir_typeid;
     51        poly_base_vtable(V) const * const parent;
    8152};
    8253
     
    8657};
    8758
    88 __cfatid_struct_poly_base(int) __cfatid_poly_base @= {
    89         (__cfa__parent_vtable *)0,
     59poly_base_vtable(int) _poly_base_vtable_instance @= { 0 };
     60poly_child_vtable(int) _poly_child_vtable_instance @= {
     61        &_poly_base_vtable_instance
    9062};
    91 __cfatid_struct_poly_child(int) __cfatid_poly_child = {
    92     &__cfatid_poly_base,
     63/* Resolver bug keeps me from adding these.
     64poly_base_vtable(char) _poly_base_vtable_instance @= { 0 };
     65poly_child_vtable(char) _poly_child_vtable_instance @= {
     66        &_poly_base_vtable_instance
    9367};
    94 poly_child_vtable(int) _poly_child_vtable_instance @= {
    95         &__cfatid_poly_child,
    96 };
     68*/
    9769
    9870void poly_poly_test() {
     
    10577        mono_poly_test();
    10678        poly_poly_test();
    107         printf( "done\n" );
     79        printf( "done\n" );                             // non-empty .expect file
    10880}
Note: See TracChangeset for help on using the changeset viewer.