[Bug c/53060] New: Typo in build_binary_op for scalar-vector ops

marc.glisse at normalesup dot org gcc-bugzilla@gcc.gnu.org
Sat Apr 21 12:09:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53060

             Bug #: 53060
           Summary: Typo in build_binary_op for scalar-vector ops
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marc.glisse@normalesup.org


Hello,

in file c-typeck.c, function build_binary_op, for mixed scalar-vector
operations, there are 2 cases: stv_firstarg and stv_secondarg. The first one
has:
                op0 = c_wrap_maybe_const (op0, true);
while the second has:
                op0 = c_wrap_maybe_const (op1, true);

I think the second one should read "op1 = ...", for symmetry.

I haven't managed to come up with a testcase that runs this line of code :-(



More information about the Gcc-bugs mailing list