[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-12 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria closed https://github.com/llvm/llvm-project/pull/130268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-12 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria updated https://github.com/llvm/llvm-project/pull/130268 From def8ab8b16eab97ffc2669631fb84406842d41e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Amatria=20Barral?= Date: Fri, 7 Mar 2025 08:45:05 +0100 Subject: [PATCH 1/2] [flang] Remove implicit assu

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-11 Thread Iñaki Amatria Barral via cfe-commits
inaki-amatria wrote: > This LGTM now when @tarunprabhu is happy, thanks for seeing this through > despite my lengthy comments! Thank you for the quick review, David! I also appreciate your patience with my lengthy comments. I was so caught up in the fixed-form assumption that I failed to real

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-11 Thread Iñaki Amatria Barral via cfe-commits
@@ -0,0 +1,35 @@ +program main + print *, __FILE__, __LINE__ +end + +! This test verifies that `flang`'s `-x` options behave like `gfortran`'s. +! Specifically: +! - `-x f95` should process the file based on its extension unless overridden. +! - `-x f95-cpp-input` should behave l

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-11 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria updated https://github.com/llvm/llvm-project/pull/130268 From 3753b14814c845ab695ffbe985f8b2fd5a478de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Amatria=20Barral?= Date: Fri, 7 Mar 2025 08:45:05 +0100 Subject: [PATCH 1/2] [flang] Remove implicit assu

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-07 Thread Iñaki Amatria Barral via cfe-commits
@@ -0,0 +1,35 @@ +program main + print *, __FILE__, __LINE__ +end + +! This test verifies that `flang`'s `-x` options behave like `gfortran`'s. +! Specifically: +! - `-x f95` should process the file based on its extension unless overridden. +! - `-x f95-cpp-input` should behave l

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-07 Thread Iñaki Amatria Barral via cfe-commits
@@ -0,0 +1,12 @@ +! This test verifies that using `-x f95` does not cause the driver to assume +! this file is in fixed-form. + +program main + print *, "Hello, World!" +end + +! RUN: %flang -### -x f95 %s 2>&1 | FileCheck --check-prefix=PRINT-PHASES %s +! PRINT-PHASES-NOT: -ffix

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-07 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria updated https://github.com/llvm/llvm-project/pull/130268 From 3753b14814c845ab695ffbe985f8b2fd5a478de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Amatria=20Barral?= Date: Fri, 7 Mar 2025 08:45:05 +0100 Subject: [PATCH 1/2] [flang] Remove implicit assu

[clang] [flang] [flang] Align `-x` language modes with `gfortran` (PR #130268)

2025-03-07 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria created https://github.com/llvm/llvm-project/pull/130268 This PR addresses some of the issues described in https://github.com/llvm/llvm-project/issues/127617. Key changes: - Stop assuming fixed-form for `-x f95` unless the input is a `.i` file. This change ens

[clang] [flang] [flang] Align `-x f95[-cpp-input]` language modes with `gfortran` (PR #127986)

2025-03-07 Thread Iñaki Amatria Barral via cfe-commits
inaki-amatria wrote: Superseded by https://github.com/llvm/llvm-project/pull/130268. https://github.com/llvm/llvm-project/pull/127986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Align `-x f95[-cpp-input]` language modes with `gfortran` (PR #127986)

2025-03-07 Thread Iñaki Amatria Barral via cfe-commits
inaki-amatria wrote: > Sorry, maybe I'm still getting a bit confused now 😅. I think in > > https://github.com/llvm/llvm-project/blob/dddfd77f653d7e88965b647e9bc38827cae8bf8a/clang/lib/Driver/Types.cpp#L300 > we are still getting things the wrong way around, even with this patch? If we > want to

[clang] [flang] [flang] Align `-x f95[-cpp-input]` language modes with `gfortran` (PR #127986)

2025-03-07 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria closed https://github.com/llvm/llvm-project/pull/127986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Align `-x f95[-cpp-input]` language modes with `gfortran` (PR #127986)

2025-03-07 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria updated https://github.com/llvm/llvm-project/pull/127986 From 8d688399f124552f5407e21f3ece08ba6a84a570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Amatria=20Barral?= Date: Fri, 7 Mar 2025 08:45:05 +0100 Subject: [PATCH 1/2] [flang] Remove implicit assu

[clang] [flang] [flang] Align `-x f95[-cpp-input]` language modes with `gfortran` (PR #127986)

2025-02-21 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria edited https://github.com/llvm/llvm-project/pull/127986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Align `-x f95[-cpp-input]` language modes with `gfortran` (PR #127986)

2025-02-20 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria edited https://github.com/llvm/llvm-project/pull/127986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Align `-x f95[-cpp-input]` language modes with `gfortran` (PR #127986)

2025-02-20 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria edited https://github.com/llvm/llvm-project/pull/127986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Align `-x f95[-cpp-input]` language modes with `gfortran` (PR #127986)

2025-02-20 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria edited https://github.com/llvm/llvm-project/pull/127986 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Align `-x f95[-cpp-input]` language modes with `gfortran` (PR #127986)

2025-02-20 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria created https://github.com/llvm/llvm-project/pull/127986 This PR may solve some of the issues described in: https://github.com/llvm/llvm-project/issues/127617. The reason to revert https://github.com/llvm/llvm-project/commit/81d82cac8c4cbd006bf991fd7380de2d728

[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

2024-06-17 Thread Iñaki Amatria Barral via cfe-commits
inaki-amatria wrote: Closing this until I post in discourse. TYSM for your time, Aaron https://github.com/llvm/llvm-project/pull/94544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

2024-06-17 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria closed https://github.com/llvm/llvm-project/pull/94544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

2024-06-13 Thread Iñaki Amatria Barral via cfe-commits
@@ -17,10 +17,6 @@ // GCNO-LOCATION: "-coverage-notes-file={{.*}}/foo/bar.gcno" // GCNO-LOCATION-REL: "-coverage-notes-file={{.*}}{{/|}}foo/bar.gcno" -/// GCC allows PWD to change the paths. -// RUN: %if system-linux %{ PWD=/proc/self/cwd %clang -### -c --coverage %s -o f

[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

2024-06-13 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria edited https://github.com/llvm/llvm-project/pull/94544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

2024-06-13 Thread Iñaki Amatria Barral via cfe-commits
inaki-amatria wrote: Ping https://github.com/llvm/llvm-project/pull/94544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

2024-06-11 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria edited https://github.com/llvm/llvm-project/pull/94544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

2024-06-11 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria edited https://github.com/llvm/llvm-project/pull/94544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

2024-06-11 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria edited https://github.com/llvm/llvm-project/pull/94544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

2024-06-11 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria edited https://github.com/llvm/llvm-project/pull/94544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][Support] Stop using PWD in current_path (PR #94544)

2024-06-11 Thread Iñaki Amatria Barral via cfe-commits
https://github.com/inaki-amatria updated https://github.com/llvm/llvm-project/pull/94544 From ed167da84dd9ad59a5b2c61bd237d041efa9d4fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Amatria=20Barral?= Date: Thu, 6 Jun 2024 00:52:30 +0200 Subject: [PATCH 1/2] [llvm][Support] Stop using PW