[Bug target/100316] New: Regression: __clear_cache() does not support NULL-pointer arguments

christophm30 at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Apr 28 12:35:35 GMT 2021


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

            Bug ID: 100316
           Summary: Regression: __clear_cache() does not support
                    NULL-pointer arguments
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: christophm30 at gmail dot com
  Target Milestone: ---

Commit c05ece9 changed __clear_cache () such, that it no longer accepts numeric
values as arguments.

In riscv-pk the following code is used to clear the instruction cache:

  __clear_cache(0, 0);

However, this no longer compiles:

      ../pk/pk.c: In function 'run_loaded_program.constprop':
      ../pk/pk.c:177:3: error: both arguments to '__builtin___clear_cache'
      must be pointers
        177 |   __clear_cache(0, 0);
            |   ^~~~~~~~~~~~~~~~~~~


Also using "NULL" or "(void*)0" does not help.

The corresponding bug ticket for PK can be found here:
  https://github.com/riscv/riscv-pk/issues/239

Is there a chance to loosen the restrictions for the arguments?


More information about the Gcc-bugs mailing list