On Sat, Dec 27, 2014 at 09:34:44AM -0800, Mike Stump wrote:
> >>> Please consider pulling the check out and putting it in at the top of the 
> >>> ubsan.exp type of files.
> >>> 
> >>> I suspect there is little need to check this more than once per language 
> >>> or so.
> > 
> > Actually, that is already how it is done :-)
> 
> No, examine i386.exp for the line at the top that does this:
> 
> # Exit immediately if this isn't a x86 target.                                
>                                                                        
> if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then {
>   return
> }
> 
> Here, you see that if there are 100,000 x86 test cases, this is checked once 
> and only about 2 lines of tcl are run.  In yours, if there were 100,000 ubsan 
> test cases, you would discover millions of lines run, not 2.  millions is 
> slightly more than 2.

>From gcc.dg/ubsan/ubsan.exp:

# Main loop.
if [check_effective_target_fsanitize_undefined] {
  gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c 
$srcdir/c-c++-common/ubsan/*.c]] "" ""
}

That only runs once, doesn't it?  Am I missing something?

There are some init things before it, but they may be needed for the
check itself.


Segher

Reply via email to