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

--- Comment #10 from Martin Sebor <msebor at gcc dot gnu.org> ---
Author: msebor
Date: Thu Jul  5 14:36:09 2018
New Revision: 262438

URL: https://gcc.gnu.org/viewcvs?rev=262438&root=gcc&view=rev
Log:
PR tree-optimization/86400 - set<string>::set<char (*)[2]) constructor does not
work with array argument

gcc/ChangeLog:
        * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
        than its domain to compute its the upper bound of a char array.

gcc/testsuite/ChangeLog:
        * gcc.dg/strlenopt-47.c: New test.
        * gcc.dg/strlenopt-48.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/strlenopt-47.c
    trunk/gcc/testsuite/gcc.dg/strlenopt-48.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-strlen.c

Reply via email to