> > Not obvious enough, it seems: this patch broke gnat.dg/lto* tests at > > least on i386-pc-solaris2.10. E.g. > > > > FAIL: gnat.dg/lto1.adb (test for excess errors) > > WARNING: gnat.dg/lto1.adb compilation failed to produce executable > > > > FAIL: gnat.dg/lto1.adb (test for excess errors) > > Excess errors: > > /vol/gcc/src/hg/trunk/solaris/gcc/testsuite/gnat.dg/lto1_pkg.adb:23:1: > > error: TYPE_MIN_VALUE is not constant > > TYPE_MIN_VALUE can be arbitrary in Ada, with or without LTO. For > > package Q is > > function LB return Natural; > function UB return Natural; > > end Q; > with Q; > > package P is > > type Arr1 is array (Natural range <>) of Boolean; > > subtype Arr2 is Arr1 (Q.LB .. Q.UB); > > end P; > > the TYPE_DOMAIN of Arr2 is > > domain <integer_type 0x7ffff69be000 type <integer_type 0x7ffff6d0e0a8 > sizetype> > sizes-gimplified visited DI size <integer_cst 0x7ffff6d0abb8 64> unit > size <integer_cst 0x7ffff6d0abd0 8> > align 64 symtab 0 alias set -1 canonical type 0x7ffff69be000 > precision > 64 min <nop_expr 0x7ffff69bd000> max <cond_expr 0x7ffff69b9420>
Thanks, I just noticed the failures. I will revert that check, it is indeed valid for min values to not be constants (and even in C max values may be variable) Honza