# Optimization flags for ifort and gfortran

**URL:** <https://fortran-lang.discourse.group/t/optimization-flags-for-ifort-and-gfortran/2721>\
**Category:** Uncategorized\
**Created:** [February 3, 2022, 2:54pm UTC](https://fortran-lang.discourse.group/t/optimization-flags-for-ifort-and-gfortran/2721 "2022-02-03T14:54:17Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![MarDie](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/mardie/32/54_2.png) [@MarDie](https://fortran-lang.discourse.group/u/MarDie)\
**Post date:** [February 3, 2022, 4:28pm UTC](https://fortran-lang.discourse.group/t/optimization-flags-for-ifort-and-gfortran/2721/3 "2022-02-03T16:28:14Z")

</div>

@Arjen: My understand was exactly the other way round. The gcc manual says: “Specifying `-march=cpu-type` implies `-mtune=cpu-type`" and "`march=cpu-type` allows GCC to generate code that may not run at all on processors other than the one indicated.”

The Intel manual says for `-xcode`: Do not use `code` values to create binaries that will execute on a processor that is not compatible with the targeted processor.

---

_[View the full topic](https://fortran-lang.discourse.group/t/optimization-flags-for-ifort-and-gfortran/2721)._
