https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87444
Bug ID: 87444 Summary: 'gcc -marc=native' sets L2 cache size equal to L3 cache size on i7 and i5 CPU Product: gcc Version: 7.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: studio at anchev dot net Target Milestone: --- STR: gcc -### -march=native /usr/include/stdlib.h lscpu | grep -i cache OS: openSUSE Leap 15.0 EXPECTED: gcc's output should show --param "l2-cache-size=<the same L2 cache which lscpu shows>" ACTUAL: gcc outputs: ... --param "l2-cache-size=8192" ... [~]: lscpu | grep -i cache L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 8192K The architecture is properly detected (ivybridge) but it seems l2-cache-size equals the L3 cache, which is incorrect. The CPU model is "Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz" A fellow openSUSE Leap 15.0 user shared that the same happens on "Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz" but not on AMD. My own test on other machines shows that on "Intel(R) Xeon(TM) CPU 2.80GHz" (nocona) and on "Intel(R) Celeron(R) M processor 1.50GHz" (pentium-m) l2-cache-size is detected correctly. The nocona is running openSUSE Leap 15.0 and the pentium-m is running openSUSE Tumbleweed (32 bit).