source: tests/global-monomorph.cfa @ 0c760db

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 0c760db was 74cfafb2, checked in by Andrew Beach <ajbeach@…>, 4 years ago

I forgot to add the tests that the specalize fix fixed.

  • Property mode set to 100644
File size: 719 bytes
Line 
1// Crea
2
3#include <stdlib.hfa>
4#include <stdio.h>
5
6forall(dtype T)
7void poly0(T &) {}
8
9forall(dtype T | sized(T))
10void poly1(T &) {}
11
12forall(otype T)
13void poly2(T &) {}
14
15struct wrapper {
16    void (*mono)(int &);
17};
18
19/* These are failing (#193):
20void (*mono0)(int &) = poly0;
21void (*mono1)(int &) = poly1;
22void (*mono2)(int &) = poly2;
23struct wrapper mono0w = { poly0 };
24struct wrapper mono1w = { poly1 };
25struct wrapper mono2w = { poly2 };
26*/
27void (*mono0c)(int &) @= poly0;
28void (*mono1c)(int &) @= poly1;
29void (*mono2c)(int &) @= poly2;
30struct wrapper mono0wc @= { poly0 };
31struct wrapper mono1wc @= { poly1 };
32struct wrapper mono2wc @= { poly2 };
33
34int main(void) {
35        printf("Compilation Successful.\n");
36        return 0;
37}
Note: See TracBrowser for help on using the repository browser.