On 07/19/2017 08:49 AM, David Malcolm wrote:
> selftest::read_file currently assumes it has a non-empty file;
> when loading an empty file it dies with an assertion failure,
> or a write through NULL if assertions are disabled.
> 
> This patch fixes this case, removing this limitation.
> 
> Successfully bootstrapped&regrtested on x86_64-pc-linux-gnu;
> takes -fself-test from 39458 passes to 39460.
> 
> OK for trunk?
> 
> gcc/ChangeLog:
>       * selftest.c (selftest::read_file): Handle 0-length files.
>       (selftest::test_read_empty_file): New function.
>       (selftest::selftest_c_tests): Call it.
OK.
jeff

Reply via email to