blob: 24a81f8cdb01b736ce1d784d562f5bb0bdc34b76 [file]
! RUN: %flang_fc1 -fsyntax-only %s
! RUN: %flang -E %s 2>&1 | FileCheck %s
implicit none
integer :: i, foobar
! CHECK-NOT: C comment
! CHECK: i = 1
/* Old style C comments
*comments
*/
#define VAL 1
/* Single-line C comment */
/* Single-line C comment */
/* Single-line C comment */
/* Single-line C comment */
/* Single-line C comment */
/* Single-line C comment */
/* Single-line C comment */
/* Single-line C comment */
i = VAL
! CHECK-NOT: /*
! CHECK-NOT: Multi
! CHECK-NOT: C comment
! CHECK-NOT: */
! CHECK: i = 2
/*
* Multi-line C comment
* comment
*/
/* Multi-line
C comment */
i = 2
! CHECK: i = 3
! CHECK: i = 4
! CHECK: 9 i = 5+ 6
/* C comment + statement */ i = 3
/* C comment + statement */ i = 4
/**/90i = 5
/**/ + + 6
! CHECK-NOT: /*
! CHECK-NOT: C comment
! CHECK-NOT: */
! CHECK: 100 i = 7
/* Multi-line C comment + statement
*/100 i = 7
! CHECK: i = 8
! CHECK-NOT: C comment
i = 8 /* C comment after statement */
! CHECK: i = 9
! CHECK-NOT: 8
i = 9
* */ 88
! When compiling, the line below should become: foobar = 123
foo/* c */ bar = 123
! CHECK: print
! CHECK-NOT: C comment
print *, "TAB"
/* C comment after tab */
end