This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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

--- Comment #1 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Valgrind has some more info:

ig25@linux-fd1f:~/Krempel/Target> valgrind
/home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1 t2.c
==23596== Memcheck, a memory error detector
==23596== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==23596== Using Valgrind-3.10.0 and LibVEX; rerun with -h for copyright info
==23596== Command: /home/ig25/lib/gcc/x86_64-pc-linux-gnu/7.0.0/cc1 t2.c
==23596== 
 foo foo_int
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <build_ssa_passes> <opt_local_passes>
<free-inline-summary> <whole-program> <targetclone>==23596== Invalid write of
size 8
==23596==    at 0x135DAB5: separate_attrs (multiple_target.c:165)
==23596==    by 0x135DAB5: expand_target_clones(cgraph_node*, bool)
(multiple_target.c:264)
==23596==    by 0x135E114: ipa_target_clone (multiple_target.c:351)
==23596==    by 0x135E114: (anonymous
namespace)::pass_target_clone::execute(function*) (multiple_target.c:379)
==23596==    by 0xAFBFFC: execute_one_pass(opt_pass*) (passes.c:2370)
==23596==    by 0xAFCE11: execute_ipa_pass_list(opt_pass*) (passes.c:2805)
==23596==    by 0x7DB053: ipa_passes (cgraphunit.c:2339)
==23596==    by 0x7DB053: symbol_table::compile() [clone .part.47]
(cgraphunit.c:2425)
==23596==    by 0x7DD816: compile (cgraphunit.c:2587)
==23596==    by 0x7DD816: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2584)
==23596==    by 0xBCBE92: compile_file() (toplev.c:493)
==23596==    by 0x63B57C: do_compile (toplev.c:2012)
==23596==    by 0x63B57C: toplev::main(int, char**) (toplev.c:2146)
==23596==    by 0x63D8D6: main (main.c:39)
==23596==  Address 0x59cc258 is 0 bytes after a block of size 8 alloc'd
==23596==    at 0x4C29110: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23596==    by 0x1432B67: xmalloc (xmalloc.c:148)
==23596==    by 0x135DA7D: expand_target_clones(cgraph_node*, bool)
(multiple_target.c:262)
==23596==    by 0x135E114: ipa_target_clone (multiple_target.c:351)
==23596==    by 0x135E114: (anonymous
namespace)::pass_target_clone::execute(function*) (multiple_target.c:379)
==23596==    by 0xAFBFFC: execute_one_pass(opt_pass*) (passes.c:2370)
==23596==    by 0xAFCE11: execute_ipa_pass_list(opt_pass*) (passes.c:2805)
==23596==    by 0x7DB053: ipa_passes (cgraphunit.c:2339)
==23596==    by 0x7DB053: symbol_table::compile() [clone .part.47]
(cgraphunit.c:2425)
==23596==    by 0x7DD816: compile (cgraphunit.c:2587)
==23596==    by 0x7DD816: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2584)
==23596==    by 0xBCBE92: compile_file() (toplev.c:493)
==23596==    by 0x63B57C: do_compile (toplev.c:2012)
==23596==    by 0x63B57C: toplev::main(int, char**) (toplev.c:2146)
==23596==    by 0x63D8D6: main (main.c:39)
==23596== 
==23596== Invalid read of size 8
==23596==    at 0x135DB40: expand_target_clones(cgraph_node*, bool)
(multiple_target.c:284)
==23596==    by 0x135E114: ipa_target_clone (multiple_target.c:351)
==23596==    by 0x135E114: (anonymous
namespace)::pass_target_clone::execute(function*) (multiple_target.c:379)
==23596==    by 0xAFBFFC: execute_one_pass(opt_pass*) (passes.c:2370)
==23596==    by 0xAFCE11: execute_ipa_pass_list(opt_pass*) (passes.c:2805)
==23596==    by 0x7DB053: ipa_passes (cgraphunit.c:2339)
==23596==    by 0x7DB053: symbol_table::compile() [clone .part.47]
(cgraphunit.c:2425)
==23596==    by 0x7DD816: compile (cgraphunit.c:2587)
==23596==    by 0x7DD816: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2584)
==23596==    by 0xBCBE92: compile_file() (toplev.c:493)
==23596==    by 0x63B57C: do_compile (toplev.c:2012)
==23596==    by 0x63B57C: toplev::main(int, char**) (toplev.c:2146)
==23596==    by 0x63D8D6: main (main.c:39)
==23596==  Address 0x59cc258 is 0 bytes after a block of size 8 alloc'd
==23596==    at 0x4C29110: malloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==23596==    by 0x1432B67: xmalloc (xmalloc.c:148)
==23596==    by 0x135DA7D: expand_target_clones(cgraph_node*, bool)
(multiple_target.c:262)
==23596==    by 0x135E114: ipa_target_clone (multiple_target.c:351)
==23596==    by 0x135E114: (anonymous
namespace)::pass_target_clone::execute(function*) (multiple_target.c:379)
==23596==    by 0xAFBFFC: execute_one_pass(opt_pass*) (passes.c:2370)
==23596==    by 0xAFCE11: execute_ipa_pass_list(opt_pass*) (passes.c:2805)
==23596==    by 0x7DB053: ipa_passes (cgraphunit.c:2339)
==23596==    by 0x7DB053: symbol_table::compile() [clone .part.47]
(cgraphunit.c:2425)
==23596==    by 0x7DD816: compile (cgraphunit.c:2587)
==23596==    by 0x7DD816: symbol_table::finalize_compilation_unit()
(cgraphunit.c:2584)
==23596==    by 0xBCBE92: compile_file() (toplev.c:493)
==23596==    by 0x63B57C: do_compile (toplev.c:2012)
==23596==    by 0x63B57C: toplev::main(int, char**) (toplev.c:2146)
==23596==    by 0x63D8D6: main (main.c:39)
==23596== 

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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]