if (((*pbuf)[comment_ix+1] == 'g' || (*pbuf)[comment_ix+1] == 'G')
&& ((*pbuf)[comment_ix+2] == 'c' || (*pbuf)[comment_ix+2] == 'C')
&& ((*pbuf)[comment_ix+3] == 'c' || (*pbuf)[comment_ix+3] == 'C')
- && (*pbuf)[comment_ix+4] == '$')
+ && c == '$')
first_comment = seen_comment = false;
if (flag_openacc
&& (*pbuf)[comment_ix+1] == '$'
&& ((*pbuf)[comment_ix+2] == 'a' || (*pbuf)[comment_ix+2] == 'A')
&& ((*pbuf)[comment_ix+3] == 'c' || (*pbuf)[comment_ix+3] == 'C')
- && ((*pbuf)[comment_ix+4] == 'c' || (*pbuf)[comment_ix+4] == 'C'))
+ && (c == 'c' || c == 'C'))
first_comment = seen_comment = false;
}
--- /dev/null
+! { dg-do compile }
+! PR fortran/97390
+!
+integer :: tempRbuffer, array, compactHaloInfo, dimsizes, nHaloLayers, gpu_nList_send, gpu_idx_send, gpu_bufferOffset_send, counter
+ !$acc data present(tempRbuffer, array, compactHaloInfo, dimsizes, nHaloLayers, gpu_nList_send, gpu_idx_send, gpu_bufferOffset_send) async(counter+1) ! { dg-error "Line truncated" }
+! { dg-error "Syntax error in Open.* variable list" "" { target "*-*-*" } .-1 }
+
+ !$acc end data ! { dg-error "Unexpected !.ACC END DATA statement" }
+end
+
+! { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 }