summaryrefslogtreecommitdiff
path: root/test cases/fortran/23 preprocess/main.f90
blob: 825174158305369932fe74eef204af49a1da98aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#define MYDEF program
MYDEF foo
    character(20) :: str
#ifdef CORRECT
        str = 'Hello, ' // 'world!'
#else
        str = 'Preprocessing error!'
#endif
    if (str /= 'Hello, world!') then
        print *, 'Preprocessing failed.'
        error stop 1
    end if
    stop 0
end MYDEF foo