Hi Tobias,

> On 29.06.21 13:58, Jakub Jelinek wrote:
>
>> Also, wonder if we shouldn't print the list of configured targets in that
>> case, see candidates_list_and_hint functions and its callers.
>> And it is unclear why we use fatal_error, can't unknown offload target names
>> be simply ignored after emitting error?
>
> Done so – as the changes now became a bit larger, I have attached the
> new version of the patch – despite the LGTM.

this patch broke Solaris bootstrap (both 32 and 64-bit sparc and x86):

/vol/gcc/src/hg/master/local/gcc/gcc.c: In function 'bool 
check_offload_target_name(const char*, ptrdiff_t)':
/vol/gcc/src/hg/master/local/gcc/gcc.c:4010:23: error: writing 1 byte into a 
region of size 0 [-Werror=stringop-overflow=]
 4010 |           cand[n - c] = '\0';
      |           ~~~~~~~~~~~~^~~~~~
In file included from /vol/gcc/src/hg/master/local/gcc/system.h:706,
                 from /vol/gcc/src/hg/master/local/gcc/gcc.c:31:
/vol/gcc/src/hg/master/local/gcc/../include/libiberty.h:733:36: note: at offset 
1 into destination object of size 1 allocated by '__builtin_alloca'
  733 | # define alloca(x) __builtin_alloca(x)
      |                    ~~~~~~~~~~~~~~~~^~~
/vol/gcc/src/hg/master/local/gcc/gcc.c:4000:29: note: in expansion of macro 
'alloca'
 4000 |       char *cand = (char *) alloca (strlen (OFFLOAD_TARGETS) + 1);
      |                             ^~~~~~

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to