[flang-commits] [flang] [clang] [flang][Driver] Let the linker fail on multiple definitions of main() (PR #73124)
    Andrzej WarzyĆski via flang-commits 
    flang-commits at lists.llvm.org
       
    Thu Nov 23 12:36:27 PST 2023
    
    
  
================
@@ -0,0 +1,8 @@
+#include <stdio.h>
+
+int main(int argc, char * argv[]) {
+    // Irrelevant what to do in here.
+    // Test is supposed to fail at link time.
+    printf("Hello from C [%s]\n", __FUNCTION__);
----------------
banach-space wrote:
Note that if you remove this line and `#include <stdio.h>` then this translation becomes super trivial, yet sufficient. 
https://github.com/llvm/llvm-project/pull/73124
    
    
More information about the flang-commits
mailing list