This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/81607] [6 Regression] Conditional operator: "type mismatch in shift expression" error


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

--- Comment #15 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
Author: aldyh
Date: Wed Sep 13 16:39:00 2017
New Revision: 252338

URL: https://gcc.gnu.org/viewcvs?rev=252338&root=gcc&view=rev
Log:
        PR c++/81607
        * cp-gimplify.c (cp_fold): If folding exposed a branch of
        a COND_EXPR, convert it to the original type of the COND_EXPR, if
        they differ.               

        * g++.dg/other/bitfield6.C: New test.

Added:
    branches/range-gen2/gcc/testsuite/g++.dg/other/bitfield6.C
Modified:
    branches/range-gen2/gcc/cp/ChangeLog
    branches/range-gen2/gcc/cp/cp-gimplify.c
    branches/range-gen2/gcc/testsuite/ChangeLog

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]