This is the mail archive of the gcc-patches@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]

Re: [PATCH 2/5] completely_scalarize arrays as well as records


On Fri, 28 Aug 2015, Alan Lawrence wrote:

> Christophe Lyon wrote:
> > 
> > I asked because I assumed that Alan saw it pass in his configuration.
> 
> 
> Bah. No - I now discover a problem in my C++ testsuite setup that was causing
> a large number of tests to not be executed. I see the problem too now,
> investigating....

Btw, your patch broke Ada:

+===========================GNAT BUG 
DETECTED==============================+
| 6.0.0 20150828 (experimental) (x86_64-pc-linux-gnu) GCC error:           
|
| in completely_scalarize, at tree-sra.c:996                               
|
| Error detected around ../rts/a-coorse.ads:46:24                          
|

    case ARRAY_TYPE:
      {
        tree elemtype = TREE_TYPE (decl_type);
        tree elem_size = TYPE_SIZE (elemtype);
        gcc_assert (elem_size && tree_fits_uhwi_p (elem_size));
        int el_size = tree_to_uhwi (elem_size);
        gcc_assert (el_size);

        tree minidx = TYPE_MIN_VALUE (TYPE_DOMAIN (decl_type));
        tree maxidx = TYPE_MAX_VALUE (TYPE_DOMAIN (decl_type));
        gcc_assert (TREE_CODE (minidx) == INTEGER_CST
                    && TREE_CODE (maxidx) == INTEGER_CST);

obviously you missed VLAs.  min/max value can also be NULL.

Richard.


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