[Bug middle-end/78099] New: Typo in sem_function::get_hash

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Oct 24 19:16:00 GMT 2016


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

            Bug ID: 78099
           Summary: Typo in sem_function::get_hash
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

sem_function::get_hash has

      /* Add common features of declaration itself.  */
      if (DECL_FUNCTION_SPECIFIC_TARGET (decl))
        hstate.add_wide_int
         (cl_target_option_hash
           (TREE_TARGET_OPTION (DECL_FUNCTION_SPECIFIC_TARGET (decl))));
      if (DECL_FUNCTION_SPECIFIC_OPTIMIZATION (decl))
         (cl_optimization_hash
           (TREE_OPTIMIZATION (DECL_FUNCTION_SPECIFIC_OPTIMIZATION (decl))));

Shouldn't it be

      if (DECL_FUNCTION_SPECIFIC_OPTIMIZATION (decl))
        hstate.add_wide_int
         ^^^^^^^^^^^^^^^^^ This is missing.
         (cl_optimization_hash
           (TREE_OPTIMIZATION (DECL_FUNCTION_SPECIFIC_OPTIMIZATION (decl))));


More information about the Gcc-bugs mailing list