[Bug other/78419] New: ICE with target_clone on invalid target

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 18 11:45:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78419

            Bug ID: 78419
           Summary: ICE with target_clone on invalid target
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tkoenig at gcc dot gnu.org
  Target Milestone: ---

ig25@linux-fd1f:~/Krempel/Target> cat t2.c 
static double foo_int(double *restrict, double *restrict, int)
__attribute__ ((target_clones("avx,foo,avx2,avx512f,default")))
;

double foo(double *restrict a, double *restrict b, int n)
{
  return foo_int(a,b,n);
}


double foo_int(double *restrict a, double *restrict b, int n)
{
  double s;
  int i;
  s = 0.0;
  for (i=0; i<n; i++)
    s += a[i] + b[i];

  return s;
}
ig25@linux-fd1f:~/Krempel/Target> gcc -S t2.c
t2.c:20:1: error: attribute(target("foo")) is unknown
 }
 ^
t2.c:11:8: warning: attribute(target_clones("foo")) is not valid for current
target
 double foo_int(double *restrict a, double *restrict b, int n)
        ^~~~~~~
*** Error in `/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1': free():
invalid next size (fast): 0x000000000301ec60 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x727df)[0x7f467a3e87df]
/lib64/libc.so.6(+0x7804e)[0x7f467a3ee04e]
/lib64/libc.so.6(+0x78d56)[0x7f467a3eed56]
/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1[0x135de19]
/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1[0x135e115]
/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1(_Z16execute_one_passP8opt_pass+0x12d)[0xafbffd]
/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1(_Z21execute_ipa_pass_listP8opt_pass+0x92)[0xafce12]
/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1[0x7db054]
/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1(_ZN12symbol_table25finalize_compilation_unitEv+0x157)[0x7dd817]
/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1[0xbcbe93]
/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1(_ZN6toplev4mainEiPPc+0x6ed)[0x63b57d]
/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1(main+0x27)[0x63d8d7]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7f467a397b05]
/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1[0x63dcc3]
======= Memory map: ========
00400000-01ef6000 r-xp 00000000 08:04 2621565                           
/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1
020f6000-020fc000 r--p 01af6000 08:04 2621565                           
/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1
020fc000-02108000 rw-p 01afc000 08:04 2621565                           
/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1
02108000-02255000 rw-p 00000000 00:00 0 
02ff7000-030f6000 rw-p 00000000 00:00 0                                  [heap]
7f4679f5e000-7f4679f74000 r-xp 00000000 08:04 795089                    
/home/ig25/lib64/libgcc_s.so.1
7f4679f74000-7f467a174000 ---p 00016000 08:04 795089                    
/home/ig25/lib64/libgcc_s.so.1
7f467a174000-7f467a175000 r--p 00016000 08:04 795089                    
/home/ig25/lib64/libgcc_s.so.1
7f467a175000-7f467a176000 rw-p 00017000 08:04 795089                    
/home/ig25/lib64/libgcc_s.so.1
7f467a176000-7f467a376000 rw-p 00000000 00:00 0 
7f467a376000-7f467a517000 r-xp 00000000 08:04 794245                    
/lib64/libc-2.19.so
7f467a517000-7f467a716000 ---p 001a1000 08:04 794245                    
/lib64/libc-2.19.so
7f467a716000-7f467a71a000 r--p 001a0000 08:04 794245                    
/lib64/libc-2.19.so
7f467a71a000-7f467a71c000 rw-p 001a4000 08:04 794245                    
/lib64/libc-2.19.so
7f467a71c000-7f467a720000 rw-p 00000000 00:00 0 
7f467a720000-7f467a820000 r-xp 00000000 08:04 795125                    
/lib64/libm-2.19.so
7f467a820000-7f467aa1f000 ---p 00100000 08:04 795125                    
/lib64/libm-2.19.so
7f467aa1f000-7f467aa20000 r--p 000ff000 08:04 795125                    
/lib64/libm-2.19.so
7f467aa20000-7f467aa21000 rw-p 00100000 08:04 795125                    
/lib64/libm-2.19.so
7f467aa21000-7f467aa24000 r-xp 00000000 08:04 795122                    
/lib64/libdl-2.19.so
7f467aa24000-7f467ac23000 ---p 00003000 08:04 795122                    
/lib64/libdl-2.19.so
7f467ac23000-7f467ac24000 r--p 00002000 08:04 795122                    
/lib64/libdl-2.19.so
7f467ac24000-7f467ac25000 rw-p 00003000 08:04 795122                    
/lib64/libdl-2.19.so
7f467ac25000-7f467ac45000 r-xp 00000000 08:04 788292                    
/lib64/ld-2.19.so
7f467ade9000-7f467aded000 rw-p 00000000 00:00 0 
7f467ae09000-7f467ae45000 rw-p 00000000 00:00 0 
7f467ae45000-7f467ae46000 r--p 00020000 08:04 788292                    
/lib64/ld-2.19.so
7f467ae46000-7f467ae47000 rw-p 00021000 08:04 788292                    
/lib64/ld-2.19.so
7f467ae47000-7f467ae48000 rw-p 00000000 00:00 0 
7fff214e2000-7fff21504000 rw-p 00000000 00:00 0                         
[stack]
7fff215fc000-7fff215fe000 r-xp 00000000 00:00 0                          [vdso]
7fff215fe000-7fff21600000 r--p 00000000 00:00 0                          [vvar]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                 
[vsyscall]
t2.c:20:1: internal compiler error: Aborted
 }
 ^
0xbcbc0f crash_signal
        ../../trunk/gcc/toplev.c:338
0x135de18 expand_target_clones
        ../../trunk/gcc/multiple_target.c:336
0x135e114 ipa_target_clone
        ../../trunk/gcc/multiple_target.c:351
0x135e114 execute
        ../../trunk/gcc/multiple_target.c:379
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
ig25@linux-fd1f:~/Krempel/Target> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../trunk/configure --prefix=/home/ig25
--enable-languages=c,c++,fortran --disable-multilib --enable-maintainer-mode
Thread model: posix
gcc version 7.0.0 20161116 (experimental) (GCC)


More information about the Gcc-bugs mailing list