[Bug c/97324] New: -mcpu=<value> isn't validated on x86

kip at thevertigo dot com gcc-bugzilla@gcc.gnu.org
Wed Oct 7 17:38:10 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97324

            Bug ID: 97324
           Summary: -mcpu=<value> isn't validated on x86
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kip at thevertigo dot com
  Target Milestone: ---

On amd64 I see the following:

$ gcc-10 -Q --help=param -mcpu=sdfdsf
gcc-10: warning: ‘-mcpu=’ is deprecated; use ‘-mtune=’ or ‘-march=’ instead
The following options control parameters:
  --param=align-loop-iterations=        4
(...)

On my POWER9 machine I see the following:

$ gcc-10 -Q --help=param -mcpu=sdfdsf
gcc-10: error: unrecognized argument in option ‘-mcpu=sdfdsf’
gcc-10: note: valid arguments to ‘-mcpu=’ are: 401 403 405 405fp 440 440fp 464
464fp 476 476fp 505 601 602 603 603e 604 604e 620 630 740 7400 7450 750 801 821
823 8540 8548 860 970 G3 G4 G5 a2 cell e300c2 e300c3 e500mc e500mc64 e5500
e6500 ec603e native power10 power3 power4 power5 power5+ power6 power6x power7
power8 power9 powerpc powerpc64 powerpc64le rs64 titan

Note that on amd64 the CPU value's nonsensical value was not validated.


More information about the Gcc-bugs mailing list