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

            Bug ID: 127170
           Summary: integer_pow2p supports Complex types; maybe remove it
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: internal-improvement
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: pinskia at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

While reviewing the patch for PR 127163, I noticed that integer_pow2p accepts
complex integer constants.  I checked all of the uses of integer_pow2p; they
are either have a check for INTEGRAL_TYPE_P or with an expression which would
not be used for complex types.  So I am thinking the support for complex types
can be removed from integer_pow2p .


The support was added back in 1994 by r0-8447-g9ad265b05ed2c5 .  And I suspect
it was just to be similar to integer_onep/integer_zerop case but as mentioned
integer_pow2p would not be used in similar places where complex int types would
be used.


If I get some time next week or the week after, I see what removing it will do.

Reply via email to