llvm / llvm/llvm-project

[Flang] The driver passes `-std=c*` to the Flang frontend

Open
#212,171 1 comment 0 reactions 0 assignees View on GitHub
flang:driver
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

The following test reveals that the driver incorrectly passes `-std=c17` to the Flang frontend, while it does not pass `-std=f2018` to the Clang frontend.

https://github.com/llvm/llvm-project/blob/d814be1bb794baf0650158a6bd1dda23f4f86e99/clang/test/Driver/flang/multiple-inputs-mixed.f90#L20-L26

Contributor guide

Open the contributing guide

Research direction

Start with clang/test/Driver/flang/multiple-inputs-mixed.f90 at the linked lines and run the test to observe which standard flags reach each frontend. Trace the driver handling for mixed C and Fortran inputs, then update the behavior and test expectations so each standard flag is passed only to its matching frontend.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, fortran
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.