source: tests/attr-priority.cfa @ 314c9d8

Last change on this file since 314c9d8 was 5ad24a2c, checked in by Andrew Beach <ajbeach@…>, 12 months ago

Added test for the checks on the constructor/destructor attributes.

  • Property mode set to 100644
File size: 371 bytes
RevLine 
[5ad24a2c]1// Although we are testing the attribute priority checks, we also have a
2// resolver error to force the expect to compare against the compiler output.
3
4int * store = 0p;
5
6__attribute__(( constructor(150) ))
7void ctor_store(void) {
8        store = malloc();
9}
10
11__attribute__(( destructor(150) ))
12void dtor_store(void) {
13        free(store);
14        store = 0;
15}
16
17int main(void) {
18        return 0;
19}
Note: See TracBrowser for help on using the repository browser.