[Bug sanitizer/69539] New: ICE in expand_UBSAN_NULL, at internal-fn.c:202

2016-01-28 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69539

Bug ID: 69539
   Summary: ICE in expand_UBSAN_NULL, at internal-fn.c:202
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: sanitizer
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---

Created attachment 37508
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37508&action=edit
preprocessed source

I'm seeing the following ICE:

include/linux/compiler.h: In function ‘__read_once_size_nocheck’:
include/linux/compiler.h:235:44: internal compiler error: in expand_UBSAN_NULL,
at internal-fn.c:202
  __READ_ONCE_SIZE;
^
0x8352b7 expand_UBSAN_NULL
../../gcc/internal-fn.c:202
0x633b87 expand_call_stmt
../../gcc/cfgexpand.c:2561
0x633b87 expand_gimple_stmt_1
../../gcc/cfgexpand.c:3536
0x633b87 expand_gimple_stmt
../../gcc/cfgexpand.c:3702
0x6358d1 expand_gimple_basic_block
../../gcc/cfgexpand.c:5708
0x63b906 execute
../../gcc/cfgexpand.c:6323

with:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/sasha/gcc-inst/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/home/sasha/gcc-inst/ --with-arch=native
--with-tune=native --enable-languages=c --enable-lto --enable-gold
--enable-stage1-languages=c
Thread model: posix
gcc version 6.0.0 20160127 (experimental) (GCC)

It is possible to reproduce using the attached preprocessed source file and:

gcc -flto -fsanitize=null  -c -o test test.c; gcc -flto test

[Bug c/63567] New: Linux kernel build error due to non-static initializers

2014-10-16 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63567

Bug ID: 63567
   Summary: Linux kernel build error due to non-static
initializers
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com

Hi all,

I'm seeing a new build issue with the linux kernel:

  CC  kernel/smpboot.o
In file included from include/linux/mutex.h:15:0,
 from include/linux/kernfs.h:13,
 from include/linux/sysfs.h:15,
 from include/linux/kobject.h:21,
 from include/linux/device.h:17,
 from include/linux/node.h:17,
 from include/linux/cpu.h:16,
 from kernel/smpboot.c:4:
include/linux/spinlock_types.h:82:2: error: initializer element is not constant
  (spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname)
  ^
include/linux/mutex.h:112:18: note: in expansion of macro
‘__SPIN_LOCK_UNLOCKED’
   , .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) \
  ^
include/linux/mutex.h:118:27: note: in expansion of macro ‘__MUTEX_INITIALIZER’
  struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
   ^
kernel/smpboot.c:80:8: note: in expansion of macro ‘DEFINE_MUTEX’
 static DEFINE_MUTEX(smpboot_threads_lock);
^
include/linux/spinlock_types.h:82:2: note: (near initialization for
‘smpboot_threads_lock.wait_lock’)
  (spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname)
  ^
include/linux/mutex.h:112:18: note: in expansion of macro
‘__SPIN_LOCK_UNLOCKED’
   , .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) \
  ^
include/linux/mutex.h:118:27: note: in expansion of macro ‘__MUTEX_INITIALIZER’
  struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
   ^
kernel/smpboot.c:80:8: note: in expansion of macro ‘DEFINE_MUTEX’
 static DEFINE_MUTEX(smpboot_threads_lock);
^
make[1]: *** [kernel/smpboot.o] Error 1
make: *** [kernel/smpboot.o] Error 2


This was bisected down to:

commit b2601928b5bf34a817b5a9a2a371c476018e634d
Author: mpolacek 
Date:   Wed Oct 15 10:08:00 2014 +

* doc/invoke.texi: Update to reflect that GNU11 is the default
mode for C.
* c-common.h (c_language_kind): Update comment.
c-family/
* c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216247
138bc75d-0d04-0410-961f-82ee72b054a4

[Bug c/63567] Linux kernel build error due to non-static initializers

2014-10-17 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63567

Sasha Levin  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #6 from Sasha Levin  ---
I'm still seeing the issue with the fix applied:

  CC  kernel/smpboot.o
In file included from include/linux/mutex.h:15:0,
 from include/linux/kernfs.h:13,
 from include/linux/sysfs.h:15,
 from include/linux/kobject.h:21,
 from include/linux/device.h:17,
 from include/linux/node.h:17,
 from include/linux/cpu.h:16,
 from kernel/smpboot.c:4:
include/linux/spinlock_types.h:82:2: error: initializer element is not constant
  (spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname)
  ^
include/linux/mutex.h:112:18: note: in expansion of macro
‘__SPIN_LOCK_UNLOCKED’
   , .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) \
  ^
include/linux/mutex.h:118:27: note: in expansion of macro ‘__MUTEX_INITIALIZER’
  struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
   ^
kernel/smpboot.c:80:8: note: in expansion of macro ‘DEFINE_MUTEX’
 static DEFINE_MUTEX(smpboot_threads_lock);
^
include/linux/spinlock_types.h:82:2: note: (near initialization for
‘smpboot_threads_lock.wait_lock’)
  (spinlock_t ) __SPIN_LOCK_INITIALIZER(lockname)
  ^
include/linux/mutex.h:112:18: note: in expansion of macro
‘__SPIN_LOCK_UNLOCKED’
   , .wait_lock = __SPIN_LOCK_UNLOCKED(lockname.wait_lock) \
  ^
include/linux/mutex.h:118:27: note: in expansion of macro ‘__MUTEX_INITIALIZER’
  struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
   ^
kernel/smpboot.c:80:8: note: in expansion of macro ‘DEFINE_MUTEX’
 static DEFINE_MUTEX(smpboot_threads_lock);

[Bug c/63567] Linux kernel build error due to non-static initializers

2014-10-18 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63567

--- Comment #8 from Sasha Levin  ---
Created attachment 33756
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33756&action=edit
Preprocessed kernel/smpboot.c


[Bug c/63567] Linux kernel build error due to non-static initializers

2014-10-18 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63567

--- Comment #9 from Sasha Levin  ---
I've attached the preprocessed kernel/smpboot.c. The problem seems to be in
line 24563:

static struct mutex smpboot_threads_lock = { .count = { (1) } , .wait_lock =
(spinlock_t ) { { .rlock = { .raw_lock = { { 0 } }, .magic = 0xdead4ead,
.owner_cpu = -1, .owner = ((void *)-1L), .dep_map = { .name =
"smpboot_threads_lock.wait_lock" } } } } , .wait_list = {
&(smpboot_threads_lock.wait_list), &(smpboot_threads_lock.wait_list) } , .magic
= &smpboot_threads_lock , .dep_map = { .name = "smpboot_threads_lock" } };


[Bug c/63567] Linux kernel build error due to non-static initializers

2014-10-18 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63567

--- Comment #11 from Sasha Levin  ---
That does the trick. Thanks!

A different issue with the patch I've previously bisected came up, I'll open a
different bug report for that.


[Bug c/63592] New: Linux kernel build failure due to duplicate exported symbols

2014-10-18 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63592

Bug ID: 63592
   Summary: Linux kernel build failure due to duplicate exported
symbols
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com
CC: mpolacek at gcc dot gnu.org

Hi,

I'm seeing the following build failure with the Linux Kernel:

/home/sasha/linux-next/lib/mpi/mpi-inline.h:82: multiple definition of
`mpihelp_sub_1'
lib/mpi/generic_mpih-lshift.o:/home/sasha/linux-next/lib/mpi/mpi-inline.h:82:
first defined here
lib/mpi/mpih-div.o: In function `mpihelp_sub':
/home/sasha/linux-next/lib/mpi/mpi-inline.h:110: multiple definition of
`mpihelp_sub'
lib/mpi/generic_mpih-lshift.o:/home/sasha/linux-next/lib/mpi/mpi-inline.h:110:
first defined here
lib/mpi/mpih-mul.o: In function `mpihelp_add_1':
/home/sasha/linux-next/lib/mpi/mpi-inline.h:39: multiple definition of
`mpihelp_add_1'
lib/mpi/generic_mpih-lshift.o:/home/sasha/linux-next/lib/mpi/mpi-inline.h:39:
first defined here
lib/mpi/mpih-mul.o: In function `mpihelp_add':
/home/sasha/linux-next/lib/mpi/mpi-inline.h:67: multiple definition of
`mpihelp_add'
lib/mpi/generic_mpih-lshift.o:/home/sasha/linux-next/lib/mpi/mpi-inline.h:67:
first defined here
lib/mpi/mpih-mul.o: In function `mpihelp_sub_1':
/home/sasha/linux-next/lib/mpi/mpi-inline.h:82: multiple definition of
`mpihelp_sub_1'
lib/mpi/generic_mpih-lshift.o:/home/sasha/linux-next/lib/mpi/mpi-inline.h:82:
first defined here
lib/mpi/mpih-mul.o: In function `mpihelp_sub':
/home/sasha/linux-next/lib/mpi/mpi-inline.h:110: multiple definition of
`mpihelp_sub'
lib/mpi/generic_mpih-lshift.o:/home/sasha/linux-next/lib/mpi/mpi-inline.h:110:
first defined here
lib/mpi/mpi-pow.o: In function `mpihelp_add':
/home/sasha/linux-next/lib/mpi/mpi-inline.h:67: multiple definition of
`mpihelp_add'
lib/mpi/generic_mpih-lshift.o:/home/sasha/linux-next/lib/mpi/mpi-inline.h:67:
first defined here
lib/mpi/mpi-pow.o: In function `mpihelp_sub_1':
/home/sasha/linux-next/lib/mpi/mpi-inline.h:82: multiple definition of
`mpihelp_sub_1'
lib/mpi/generic_mpih-lshift.o:/home/sasha/linux-next/lib/mpi/mpi-inline.h:82:
first defined here
lib/mpi/mpi-pow.o: In function `mpihelp_sub':
/home/sasha/linux-next/lib/mpi/mpi-inline.h:110: multiple definition of
`mpihelp_sub'
lib/mpi/generic_mpih-lshift.o:/home/sasha/linux-next/lib/mpi/mpi-inline.h:110:
first defined here
lib/mpi/mpi-pow.o: In function `mpihelp_add_1':
/home/sasha/linux-next/lib/mpi/mpi-inline.h:39: multiple definition of
`mpihelp_add_1'
lib/mpi/generic_mpih-lshift.o:/home/sasha/linux-next/lib/mpi/mpi-inline.h:39:
first defined here
lib/mpi/mpiutil.o: In function `mpihelp_add':
/home/sasha/linux-next/lib/mpi/mpi-inline.h:67: multiple definition of
`mpihelp_add'
lib/mpi/generic_mpih-lshift.o:/home/sasha/linux-next/lib/mpi/mpi-inline.h:67:
first defined here
lib/mpi/mpiutil.o: In function `mpihelp_sub_1':
/home/sasha/linux-next/lib/mpi/mpi-inline.h:82: multiple definition of
`mpihelp_sub_1'
lib/mpi/generic_mpih-lshift.o:/home/sasha/linux-next/lib/mpi/mpi-inline.h:82:
first defined here
lib/mpi/mpiutil.o: In function `mpihelp_sub':
/home/sasha/linux-next/lib/mpi/mpi-inline.h:110: multiple definition of
`mpihelp_sub'
lib/mpi/generic_mpih-lshift.o:/home/sasha/linux-next/lib/mpi/mpi-inline.h:110:
first defined here
lib/mpi/mpiutil.o: In function `mpihelp_add_1':
/home/sasha/linux-next/lib/mpi/mpi-inline.h:39: multiple definition of
`mpihelp_add_1'
lib/mpi/generic_mpih-lshift.o:/home/sasha/linux-next/lib/mpi/mpi-inline.h:39:
first defined here
make[1]: *** [lib/mpi/mpi.o] Error 1
make: *** [lib/mpi/] Error 2


This was bisected down to GCC commit:

commit b2601928b5bf34a817b5a9a2a371c476018e634d  
Author: mpolacek   
Date:   Wed Oct 15 10:08:00 2014 +  

* doc/invoke.texi: Update to reflect that GNU11 is the default  
mode for C.  
* c-common.h (c_language_kind): Update comment.  
c-family/  
* c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.  


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216247
138bc75d-0d04-0410-961f-82ee72b054a4


[Bug c/63595] New: Segmentation faults inside kernel

2014-10-19 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63595

Bug ID: 63595
   Summary: Segmentation faults inside kernel
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com
CC: marxin at gcc dot gnu.org

Hi all,

I've observed segmentation faults on simple programs, such as:

$ mkdir test
Segmentation fault

Inside a kernel built from the latest master branch.

I've bisected the problem down to:

commit 52200d03c231f0bddbd4bbc5cd3608c6a1dd4598  
Author: marxin   
Date:   Thu Oct 16 10:47:55 2014 +  

IPA ICF pass, part 3/5  

* Makefile.in: New object files included.  
* cgraph.c (cgraph_node::dump): New cgraph_node flag icf_merged  
is printed.  
(verify_edge_corresponds_to_fndecl): More sensitive verification  
of nodes that are merged by IPA ICF.  
* cgraph.h (cgraph_node::num_references): New function.  
* cgraphunit.c (cgraph_node::expand_thunk): White space fixed.  
* common.opt: New options ipa-icf, ipa-icf-functions and  
ipa-icf-variables introduced.  
* doc/invoke.texi: Documentation of new options introduced.  
* ipa-icf-gimple.c: New file.  
* ipa-icf-gimple.h: New file.  
* ipa-icf.c: New file.  
* ipa-icf.h: New file.  
* lto-cgraph.c (lto_output_node): Streaming of icf_merged flag added.  
(input_overwrite_node): Likewise.  
* lto-section-in.c: New icf section added.  
* lto-streamer.h (enum lto_section_type): Likewise.  
* opts.c (common_handle_option): New option added.  
* passes.def: New pass included.  
* timevar.def: Time variable for IPA ICF added.  
* tree-pass.h: New IPA ICF pass entry point added.  



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216305
138bc75d-0d04-0410-961f-82ee72b054a4


[Bug c/63592] Linux kernel build failure due to duplicate exported symbols

2014-10-19 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63592

--- Comment #2 from Sasha Levin  ---
But that... worked previously? Is backward compatibility intended to be broken
in this case?


[Bug tree-optimization/63595] Segmentation faults inside kernel

2014-10-19 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63595

--- Comment #2 from Sasha Levin  ---
Thanks. I'll keep an eye on both of them, and will report here if the fix for
either of those fixes the segmentation faults I'm seeing.

Did you happen to bisect it down to the same commit?


[Bug libgcc/63684] New: Build failure due to "Let GDB reuse GCC's parser."

2014-10-29 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63684

Bug ID: 63684
   Summary: Build failure due to "Let GDB reuse GCC's parser."
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgcc
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com
CC: pmuldoon at redhat dot com

Hi,

I'm seeing the following build error:

n file included from ../.././libcc1/findcomp.cc:20:0:
../.././libcc1/../gcc/config.h:6:23: fatal error: auto-host.h: No such file or
directory
compilation terminated.
In file included from ../.././libcc1/plugin.cc:27:0:
../.././libcc1/../gcc/config.h:6:23: fatal error: auto-host.h: No such file or
directory
compilation terminated.

I've bisected it down to:

commit ab103e33b2aae243b231eba689e0b99418fa1663
Author: pmuldoon 
Date:   Mon Oct 27 17:21:42 2014 +

Let GDB reuse GCC's parser.


[Bug libgcc/63684] Build failure due to "Let GDB reuse GCC's parser."

2014-10-29 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63684

--- Comment #2 from Sasha Levin  ---
Building on x86, config options are:

./configure --prefix=/home/sasha/gcc-inst/ --with-arch=native
--with-tune=native --enable-languages=c --enable-lto --enable-gold
--disable-libstdcxx 
e --with-tune=native --enable-languages=c --enable-lto --enable-gold
--disable-libstdcx


[Bug libgcc/63684] Build failure due to "Let GDB reuse GCC's parser."

2014-10-29 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63684

--- Comment #4 from Sasha Levin  ---
Created attachment 33846
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33846&action=edit
Build log


[Bug libgcc/63684] Build failure due to "Let GDB reuse GCC's parser."

2014-10-29 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63684

--- Comment #5 from Sasha Levin  ---
It happened very early. I've attached the full build log for reference.


[Bug libgcc/63684] Build failure due to "Let GDB reuse GCC's parser."

2014-10-29 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63684

--- Comment #7 from Sasha Levin  ---
The built was from a clean checkout. 

auto-host.h seems to be correctly created during the build. I see this after
the build failure:

$ stat host-x86_64-unknown-linux-gnu/gcc/auto-host.h 
  File: `host-x86_64-unknown-linux-gnu/gcc/auto-host.h'
  Size: 47262   Blocks: 96 IO Block: 4096   regular file
Device: fe00h/65024dInode: 15209562Links: 1
Access: (0644/-rw-r--r--)  Uid: (10017/   sasha)   Gid: (10017/   sasha)
Access: 2014-10-29 15:59:10.713463956 -0400
Modify: 2014-10-29 15:59:09.677398847 -0400
Change: 2014-10-29 15:59:09.685399348 -0400
 Birth: -


[Bug libgcc/63684] Build failure due to "Let GDB reuse GCC's parser."

2014-10-29 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63684

--- Comment #11 from Sasha Levin  ---
That's correct. I'm just building in-tree and using 'git clean -df' to reset
everything back to a pristine checkout state when I need to.


[Bug libgcc/63684] Build failure due to "Let GDB reuse GCC's parser."

2014-10-29 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63684

--- Comment #13 from Sasha Levin  ---
>From "Installing GCC: Configuration"
(https://gcc.gnu.org/install/configure.html):

"building where srcdir == objdir should still work, but doesn't get extensive
testing"


[Bug libgcc/63684] Build failure due to "Let GDB reuse GCC's parser."

2014-10-30 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63684

--- Comment #16 from Sasha Levin  ---
The build works fine if I'm using a different obj directory.


[Bug c/63767] New: Excessive memory usage/crash on compilation

2014-11-06 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63767

Bug ID: 63767
   Summary: Excessive memory usage/crash on compilation
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com
CC: rguenther at suse dot de

On the trunk branch I'm seeing excessive memory usage (reaching 400GB) followed
by a crash:

  CC  net/core/sock.o
gcc: internal compiler error: Killed (program cc1)
0x40bf6c execute
../../gcc/gcc.c:2908
0x410477 driver::do_spec_on_infiles() const
../../gcc/gcc.c:7529
0x403223 driver::main(int, char**)
../../gcc/gcc.c:6796
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.

It always happens when compiling the Linux Kernel net/core/sock.c . I've attach
the preprocessed source file.

This issue was bisected to the following commit:

commit d0eb9b3dcd3d5c6ff85aaff9753c187423aeb764  
Author: rguenth   
Date:   Thu Nov 6 09:07:39 2014 +  

2014-11-06  Richard Biener

* match.pd: Implement bitwise binary and unary simplifications  
from tree-ssa-forwprop.c.  
* fold-const.c (fold_unary_loc): Remove them here.  
(fold_binary_loc): Likewise.  
* tree-ssa-forwprop.c (simplify_not_neg_expr): Remove.  
(truth_valued_ssa_name): Likewise.  
(lookup_logical_inverted_value): Likewise.  
(simplify_bitwise_binary_1): Likewise.  
(hoist_conversion_for_bitop_p): Likewise.  
(simplify_bitwise_binary_boolean): Likewise.  
(simplify_bitwise_binary): Likewise.  
(pass_forwprop::execute): Remove calls to simplify_not_neg_expr  
and simplify_bitwise_binary.  
* genmatch.c (dt_node::append_true_op): Use safe_as_a for parent.  
(decision_tree::insert): Also insert non-expressions.  

* gcc.dg/tree-ssa/forwprop-28.c: Adjust scanning for the
desired transform.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217178
138bc75d-0d04-0410-961f-82ee72b054a4

My gcc build was using this configuration:

../configure --prefix=/home/sasha/gcc-inst/ --with-arch=native
--with-tune=native --enable-languages=c --enable-lto --enable-gold
--enable-stage1-languages=c


[Bug c/63767] Excessive memory usage/crash on compilation

2014-11-06 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63767

--- Comment #1 from Sasha Levin  ---
Created attachment 33914
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33914&action=edit
Preprocessed source


[Bug c/63879] New: ICE compiling Linux Kernel fs/ext3/namei.c

2014-11-14 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63879

Bug ID: 63879
   Summary: ICE compiling Linux Kernel fs/ext3/namei.c
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com
CC: mpolacek at gcc dot gnu.org

Created attachment 33978
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33978&action=edit
Preprocessed source

I'm seeing very high memory usage followed by:

{standard input}: Assembler messages:
{standard input}:2183: Warning: end of file not at end of a line; newline
inserted
{standard input}:4163: Error: number of operands mismatch for `movq'
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc
directive
gcc: internal compiler error: Killed (program cc1)
0x40c3cc execute
../../gcc/gcc.c:2912
0x410917 driver::do_spec_on_infiles() const
../../gcc/gcc.c:7674
0x40322b driver::main(int, char**)
../../gcc/gcc.c:6911

I've bisected this issue down to:

commit 1043013c91c08e3d8cd665b3f960f658918d69fe
Author: mpolacek 
Date:   Fri Nov 14 11:57:05 2014 +

* fold-const.c (fold_negate_expr): Don't fold INTEGER_CST if
that overflows when SANITIZE_SI_OVERFLOW is on.  Guard -(-A)
folding with TYPE_OVERFLOW_SANITIZED.

* c-c++-common/ubsan/overflow-negate-3.c: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217556
138bc75d-0d04-0410-961f-82ee7

Preprocessed fs/ext3/namei.c attached.


[Bug middle-end/63879] ICE compiling Linux Kernel fs/ext3/namei.c

2014-11-15 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63879

--- Comment #2 from Sasha Levin  ---
$ gcc -Wp,-MD,fs/ext3/.namei.o.d  -nostdinc -isystem
/home/sasha/gcc-inst/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include
-I./arch/x86/include -Iarch/x86/include/generated  -Iinclude
-I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi
-Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall
-Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m64
-mno-80387 -mno-fp-ret-in-387 -march=native -mno-red-zone -mcmodel=kernel
-funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI
-DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1
-DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1
-pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2
--param=allow-store-data-races=0 -fno-reorder-blocks -fno-ipa-cp-clone
-fno-partial-inlining -Wframe-larger-than=2048 -fstack-protector
-Wno-unused-but-set-variable -fno-omit-frame-pointer
-fno-optimize-sibling-calls -fno-var-tracking-assignments -g -gdwarf-4 -pg
-mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign
-fno-strict-overflow -fconserve-stack -Werror=implicit-int
-Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO   
-fsanitize=kernel-address -fasan-shadow-offset=0xdfffe900 --param
asan-instrumentation-with-call-threshold=1   -fsanitize=undefined 
-fno-sanitize=unreachable  -fno-sanitize=float-cast-overflow   
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(namei)" 
-D"KBUILD_MODNAME=KBUILD_STR(ext3)" -c -o fs/ext3/.tmp_namei.o fs/ext3/namei.i
{standard input}: Assembler messages:
{standard input}:2183: Warning: end of file not at end of a line; newline
inserted
{standard input}:4163: Error: number of operands mismatch for `movq'
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc
directive
gcc: internal compiler error: Segmentation fault (program cc1)
0x40c3cc execute
../../gcc/gcc.c:2912
0x410917 driver::do_spec_on_infiles() const
../../gcc/gcc.c:7674
0x40322b driver::main(int, char**)
../../gcc/gcc.c:6911
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


[Bug middle-end/63879] ICE compiling Linux Kernel fs/ext3/namei.c

2014-11-15 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63879

--- Comment #4 from Sasha Levin  ---
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/sasha/gcc-inst/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/home/sasha/gcc-inst/ --with-arch=native
--with-tune=native --enable-languages=c --enable-lto --enable-gold
--enable-stage1-languages=c
Thread model: posix
gcc version 5.0.0 20141114 (experimental) (GCC)


[Bug middle-end/63879] ICE compiling Linux Kernel fs/ext3/namei.c

2014-11-15 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63879

--- Comment #6 from Sasha Levin  ---
Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/home/sasha/gcc-inst/ --with-arch=native
--with-tune=native --enable-languages=c --enable-lto --enable-gold
--enable-stage1-languages=c
Thread model: posix
gcc version 5.0.0 20141114 (experimental) (GCC) 

COLLECT_GCC_OPTIONS='-v' '-nostdinc' '-isystem'
'/home/sasha/gcc-inst/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include' '-I'
'./arch/x86/include' '-I' 'arch/x86/include/generated
' '-I' 'include' '-I' './arch/x86/include/uapi' '-I'
'arch/x86/include/generated/uapi' '-I' './include/uapi' '-I'
'include/generated/uapi' '-include' './include/linux/kconfig.h
' '-D' '__KERNEL__' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wno-trigraphs'
'-fno-strict-aliasing' '-fno-common' '-Werror=implicit-function-declaration'
'-Wno-format-security'
 '-std=gnu90' '-m64' '-mno-80387' '-mno-fp-ret-in-387' '-march=native'
'-mno-red-zone' '-mcmodel=kernel' '-funit-at-a-time'
'-maccumulate-outgoing-args' '-D' 'CONFIG_X86_X32_AB
I' '-D' 'CONFIG_AS_CFI=1' '-D' 'CONFIG_AS_CFI_SIGNAL_FRAME=1' '-D'
'CONFIG_AS_CFI_SECTIONS=1' '-D' 'CONFIG_AS_FXSAVEQ=1' '-D' 'CONFIG_AS_CRC32=1'
'-D' 'CONFIG_AS_AVX=1' '-D' 'C
ONFIG_AS_AVX2=1' '-pipe' '-Wno-sign-compare' '-fno-asynchronous-unwind-tables'
'-mno-sse' '-mno-mmx' '-mno-sse2' '-mno-3dnow' '-mno-avx'
'-fno-delete-null-pointer-checks' '-O2'
 '--param' 'allow-store-data-races=0' '-fno-reorder-blocks' '-fno-ipa-cp-clone'
'-fno-partial-inlining' '-Wframe-larger-than=2048' '-fstack-protector'
'-Wno-unused-but-set-vari
able' '-fno-omit-frame-pointer' '-fno-optimize-sibling-calls'
'-fno-var-tracking-assignments' '-g' '-gdwarf-4' '-pg' '-mfentry' '-D'
'CC_USING_FENTRY' '-Wdeclaration-after-stat
ement' '-Wno-pointer-sign' '-fno-strict-overflow' '-fconserve-stack'
'-Werror=implicit-int' '-Werror=strict-prototypes' '-Werror=date-time' '-D'
'CC_HAVE_ASM_GOTO' '-fsanitize=
kernel-address' '-fasan-shadow-offset=0xdfffe900' '--param'
'asan-instrumentation-with-call-threshold=1' '-fsanitize=undefined'
'-fno-sanitize=unreachable' '-fno-sa
nitize=float-cast-overflow' '-D' 'KBUILD_STR(s)=#s' '-D'
'KBUILD_BASENAME=KBUILD_STR(namei)' '-D' 'KBUILD_MODNAME=KBUILD_STR(ext3)' '-c'
'-o' 'fs/ext3/.tmp_namei.o' 
 /home/sasha/gcc-inst/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/cc1
-fpreprocessed fs/ext3/namei.i -march=nehalem -mmmx -mno-3dnow -msse -msse2
-msse3 -mssse3 -mno-sse4a -mcx1
6 -msahf -mno-movbe -mno-aes -mno-sha -mno-pclmul -mpopcnt -mno-abm -mno-lwp
-mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2
-msse4.2 -msse4.1 -mno-l
zcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed
-mno-prfchw -  
mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er
-mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec
-mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl --param l1-cache-size=32
--param l1-cache-line-size=64 --param l2-cache-size=24576 -mtune=nehalem -quiet
-dumpbase namei.i -m64 -mno-80387 -mno-fp-ret-in-387 -mno-red-zone
-mcmodel=kernel -maccumulate-outgoing-args -mno-sse -mno-mmx -mno-sse2
-mno-3dnow -mno-avx -mfentry -auxbase-strip fs/ext3/.tmp_namei.o -g -gdwarf-4
-O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-Werror=implicit-function-declaration -Wno-format-security -Wno-sign-compare
-Wframe-larger-than=2048 -Wno-unused-but-set-variable
-Wdeclaration-after-statement -Wno-pointer-sign -Werror=implicit-int
-Werror=strict-prototypes -Werror=date-time -std=gnu90 -version -p
-fno-strict-aliasing -fno-common -funit-at-a-time
-fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks
-fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -fstack-protector
-fno-omit-frame-pointer -fno-optimize-sibling-calls
-fno-var-tracking-assignments -fno-strict-overflow -fconserve-stack
-fsanitize=kernel-address -fasan-shadow-offset=0xdfffe900
-fsanitize=undefined -fno-sanitize=unreachable
-fno-sanitize=float-cast-overflow --param allow-store-data-races=0 --param
asan-instrumentation-with-call-threshold=1 -o - | 
 as -v -I ./arch/x86/include -I arch/x86/include/generated -I include -I
./arch/x86/include/uapi -I arch/x86/include/generated/uapi -I ./include/uapi -I
include/generated/uapi --64 -o fs/ext3/.tmp_namei.o
GNU assembler version 2.24 (x86_64-linux-gnu) using BFD version (GNU Binutils
for Debian) 2.24
GNU C (GCC) version 5.0.0 20141114 (experimental) (x86_64-unknown-linux-gnu)
compiled by GNU C version 5.0.0 20141114 (experimental), GMP version
5.0.5, MPFR version 3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 5.0.0 20141114 (experimental) (x86_64-unknown-linux-gnu)
compiled by GNU C version 5.0.0 20141114 (experimental), GMP version
5.0.5, MPFR version 3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-

[Bug c/63984] New: [5 Regression] ICE compiling kernel's arch/x86/realmode/rm/wakemain.c

2014-11-19 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63984

Bug ID: 63984
   Summary: [5 Regression] ICE compiling kernel's
arch/x86/realmode/rm/wakemain.c
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com
CC: rth at gcc dot gnu.org

Created attachment 34044
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34044&action=edit
Preprocessed source

I'm seeing the following:

$ gcc -v -nostdinc -isystem
/home/sasha/gcc-inst/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include
-I./arch/x86/include -Iarch/x86/include/generated  -Iinclude
-I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi
-Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__
-I./arch/x86/include -Iarch/x86/include/generated -Iinclude
-I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi
-Iinclude/generated/uapi -include ./include/linux/kconfig.h -m16 -g -Os
-D__KERNEL__ -DDISABLE_BRANCH_PROFILING -Wall -Wstrict-prototypes -march=i386
-mregparm=3 -fno-strict-aliasing -c -o arch/x86/realmode/rm/.tmp_wakemain.o
arch/x86/realmode/rm/wakemain.i

Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/home/sasha/gcc-inst/ --with-arch=native
--with-tune=native --enable-languages=c --enable-lto --enable-gold
--enable-stage1-languages=c
Thread model: posix
gcc version 5.0.0 20141119 (experimental) (GCC) 

COLLECT_GCC_OPTIONS='-v' '-nostdinc' '-isystem'
'/home/sasha/gcc-inst/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include' '-I'
'./arch/x86/include' '-I' 'arch/x86/include/generated' '-I' 'include' '-I'
'./arch/x86/include/uapi' '-I' 'arch/x86/include/generated/uapi' '-I'
'./include/uapi' '-I' 'include/generated/uapi' '-include'
'./include/linux/kconfig.h' '-D' '__KERNEL__' '-I' './arch/x86/include' '-I'
'arch/x86/include/generated' '-I' 'include' '-I' './arch/x86/include/uapi' '-I'
'arch/x86/include/generated/uapi' '-I' './include/uapi' '-I'
'include/generated/uapi' '-include' './include/linux/kconfig.h' '-m16' '-g'
'-Os' '-D' '__KERNEL__' '-D' 'DISABLE_BRANCH_PROFILING' '-Wall'
'-Wstrict-prototypes' '-march=i386' '-mregparm=3' '-fno-strict-aliasing' '-c'
'-o' 'arch/x86/realmode/rm/.tmp_wakemain.o'
 /home/sasha/gcc-inst/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/cc1
-fpreprocessed arch/x86/realmode/rm/wakemain.i -quiet -dumpbase wakemain.i -m16
-march=i386 -mregparm=3 -auxbase-strip arch/x86/realmode/rm/.tmp_wakemain.o -g
-Os -Wall -Wstrict-prototypes -version -fno-strict-aliasing -o /tmp/ccWnGBzY.s
GNU C (GCC) version 5.0.0 20141119 (experimental) (x86_64-unknown-linux-gnu)
compiled by GNU C version 5.0.0 20141119 (experimental), GMP version
5.0.5, MPFR version 3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 5.0.0 20141119 (experimental) (x86_64-unknown-linux-gnu)
compiled by GNU C version 5.0.0 20141119 (experimental), GMP version
5.0.5, MPFR version 3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: d04643349a41d5027a15b8bfd01906cd
In file included from arch/x86/realmode/rm/wakemain.c:2:0:
./arch/x86/boot/boot.h:340:6: warning: conflicting types for built-in function
‘puts’
 void puts(const char *);
  ^
./arch/x86/boot/boot.h:341:6: warning: conflicting types for built-in function
‘putchar’ 
 void putchar(int);
  ^
arch/x86/realmode/rm/wakemain.c:64:6: warning: return type of ‘main’ is not
‘int’ [-Wmain]
 void main(void)
  ^
arch/x86/realmode/rm/wakemain.c: In function ‘main’:
arch/x86/realmode/rm/wakemain.c:82:1: internal compiler error: in
ix86_expand_prologue, at config/i386/i386.c:11347
 }
 ^
0xda1444 ix86_expand_prologue()
../../gcc/config/i386/i386.c:11347
0xe8da4a gen_prologue()
../../gcc/config/i386/i386.md:12095
0x84c6dd thread_prologue_and_epilogue_insns()
../../gcc/function.c:5911
0x84cff2 rest_of_handle_thread_prologue_and_epilogue
../../gcc/function.c:6481
0x84cff2 execute
../../gcc/function.c:6519
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug r

[Bug tree-optimization/64004] New: [5 Regressio] Build error in tree-ssa-loop-niter.c in maybe_lower_iteration_bound

2014-11-20 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64004

Bug ID: 64004
   Summary: [5 Regressio] Build error in tree-ssa-loop-niter.c in
maybe_lower_iteration_bound
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com
CC: ams at gcc dot gnu.org

I'm seeing the following build error:

../../gcc/tree-ssa-loop-niter.c: In function ‘void
maybe_lower_iteration_bound(loop*)’:
../../gcc/tree-ssa-loop-niter.c:3420:38: error: ‘struct
vec’ has no member named ‘empty’  
if (exit_warned && !problem_stmts.empty ())  
  ^  
make[3]: *** [tree-ssa-loop-niter.o] Error 1

Configuration used (on amd64):

../configure --prefix=/home/sasha/gcc-inst/ --with-arch=native
--with-tune=native --enable-languages=c --enable-lto --enable-gold
--enable-stage1-languages=c

Seems to be introduced by commit:

commit f18e93a8e53abb42cdcb344d966808be2505a9dc  
Author: ams   
Date:   Thu Nov 20 20:22:54 2014 +  

Warn on undefined loop exit.  

2014-11-20  Andrew Stubbs

gcc/  
* tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Warn if a loop  
condition would be removed due to undefined behaviour.  

gcc/testsuite/  
* gcc.dg/undefined-loop-1.c: New file.  
* gcc.dg/undefined-loop-2.c: New file.  



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217891
138bc75d-0d04-0410-961f-82ee72b054a4

[Bug c/64083] New: ICE compiling Linux Kernel drivers/isdn/i4l/isdn_net.c

2014-11-26 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64083

Bug ID: 64083
   Summary: ICE compiling Linux Kernel drivers/isdn/i4l/isdn_net.c
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com
CC: rguenth at gcc dot gnu.org

Created attachment 34124
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34124&action=edit
Preprocessed source

I'm seeing the following ICE when compiling drivers/isdn/i4l/isdn_net.c:

$ gcc -v -Wp,-MD,drivers/isdn/i4l/.isdn_net.o.d  -nostdinc -isystem
/home/sasha/gcc-inst/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include
-I./arch/x86/include -Iarch/x86/include/generated  -Iinclude
-I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi
-Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall
-Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m64
-mno-80387 -mno-fp-ret-in-387 -march=core2 -mno-red-zone -mcmodel=kernel
-funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI
-DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1
-DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1
-pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2
--param=allow-store-data-races=0 -fno-reorder-blocks -fno-ipa-cp-clone
-fno-partial-inlining -Wframe-larger-than=2048 -fstack-protector
-Wno-unused-but-set-variable -fno-omit-frame-pointer
-fno-optimize-sibling-calls -fno-var-tracking-assignments -g -gdwarf-4 -pg
-mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign
-fno-strict-overflow -fconserve-stack -Werror=implicit-int
-Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO   
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(isdn_net)" 
-D"KBUILD_MODNAME=KBUILD_STR(isdn)" -c -o drivers/isdn/i4l/.tmp_isdn_net.o
drivers/isdn/i4l/isdn_net.c

Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/home/sasha/gcc-inst/ --with-arch=native
--with-tune=native --enable-languages=c --enable-lto --enable-gold
--enable-stage1-languages=c
Thread model: posix
gcc version 5.0.0 20140905 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-nostdinc' '-isystem'
'/home/sasha/gcc-inst/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include' '-I'
'./arch/x86/include' '-I' 'arch/x86/include/generated' '-I' 'include' '-I'
'./arch/x86/include/uapi' '-I' 'arch/x86/include/generated/uapi' '-I'
'./include/uapi' '-I' 'include/generated/uapi' '-include'
'./include/linux/kconfig.h' '-D' '__KERNEL__' '-Wall' '-Wundef'
'-Wstrict-prototypes' '-Wno-trigraphs' '-fno-strict-aliasing' '-fno-common'
'-Werror=implicit-function-declaration' '-Wno-format-security' '-std=gnu90'
'-m64' '-mno-80387' '-mno-fp-ret-in-387' '-march=core2' '-mno-red-zone'
'-mcmodel=kernel' '-funit-at-a-time' '-maccumulate-outgoing-args' '-D'
'CONFIG_X86_X32_ABI' '-D' 'CONFIG_AS_CFI=1' '-D' 'CONFIG_AS_CFI_SIGNAL_FRAME=1'
'-D' 'CONFIG_AS_CFI_SECTIONS=1' '-D' 'CONFIG_AS_FXSAVEQ=1' '-D'
'CONFIG_AS_CRC32=1' '-D' 'CONFIG_AS_AVX=1' '-D' 'CONFIG_AS_AVX2=1' '-pipe'
'-Wno-sign-compare' '-fno-asynchronous-unwind-tables' '-mno-sse' '-mno-mmx'
'-mno-sse2' '-mno-3dnow' '-mno-avx' '-fno-delete-null-pointer-checks' '-O2'
'--param' 'allow-store-data-races=0' '-fno-reorder-blocks' '-fno-ipa-cp-clone'
'-fno-partial-inlining' '-Wframe-larger-than=2048' '-fstack-protector'
'-Wno-unused-but-set-variable' '-fno-omit-frame-pointer'
'-fno-optimize-sibling-calls' '-fno-var-tracking-assignments' '-g' '-gdwarf-4'
'-pg' '-mfentry' '-D' 'CC_USING_FENTRY' '-Wdeclaration-after-statement'
'-Wno-pointer-sign' '-fno-strict-overflow' '-fconserve-stack'
'-Werror=implicit-int' '-Werror=strict-prototypes' '-Werror=date-ti

[Bug sanitizer/64170] New: [5 Regression] ICE compiling Linux Kernel drivers/media/rc/imon.c in imon_incoming_packet

2014-12-03 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64170

Bug ID: 64170
   Summary: [5 Regression] ICE compiling Linux Kernel
drivers/media/rc/imon.c in imon_incoming_packet
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: sanitizer
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org,
y.gribov at samsung dot com, ygribov at gcc dot gnu.org

Created attachment 34180
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34180&action=edit
Preprocessed source

I'm seeing the following failure:

$ gcc -v -Wp,-MD,drivers/media/rc/.imon.o.d  -nostdinc -isystem
/home/sasha/gcc-inst/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include
-I./arch/x86/include -Iarch/x86/include/generated  -Iinclude
-I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi
-Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall
-Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m64
-mno-80387 -mno-fp-ret-in-387 -march=native -mno-red-zone -mcmodel=kernel
-funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI
-DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1
-DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1
-pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2
--param=allow-store-data-races=0 -fno-reorder-blocks -fno-ipa-cp-clone
-fno-partial-inlining -Wframe-larger-than=2048 -fstack-protector
-Wno-unused-but-set-variable -fno-omit-frame-pointer
-fno-optimize-sibling-calls -fno-var-tracking-assignments -g -gdwarf-4 -pg
-mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign
-fno-strict-overflow -fconserve-stack -Werror=implicit-int
-Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO   
-fsanitize=kernel-address -fasan-shadow-offset=0xdfffe900 --param
asan-instrumentation-with-call-threshold=1   -fsanitize=undefined 
-fno-sanitize=unreachable  -fno-sanitize=float-cast-overflow   
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(imon)" 
-D"KBUILD_MODNAME=KBUILD_STR(imon)" -c -o drivers/media/rc/.tmp_imon.o
drivers/media/rc/imon.c

Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/home/sasha/gcc-inst/ --with-arch=native
--with-tune=native --enable-languages=c --enable-lto --enable-gold
--enable-stage1-languages=c
Thread model: posix
gcc version 5.0.0 20141203 (experimental) (GCC) 

COLLECT_GCC_OPTIONS='-v' '-nostdinc' '-isystem'
'/home/sasha/gcc-inst/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include' '-I'
'./arch/x86/include' '-I' 'arch/x86/include/generated' '-I' 'include' '-I'
'./arch/x86/include/uapi' '-I' 'arch/x86/include/generated/uapi' '-I'
'./include/uapi' '-I' 'include/generated/uapi' '-include'
'./include/linux/kconfig.h' '-D' '__KERNEL__' '-Wall' '-Wundef'
'-Wstrict-prototypes' '-Wno-trigraphs' '-fno-strict-aliasing' '-fno-common'
'-Werror=implicit-function-declaration' '-Wno-format-security' '-std=gnu90'
'-m64' '-mno-80387' '-mno-fp-ret-in-387' '-march=native' '-mno-red-zone'
'-mcmodel=kernel' '-funit-at-a-time' '-maccumulate-outgoing-args' '-D'
'CONFIG_X86_X32_ABI' '-D' 'CONFIG_AS_CFI=1' '-D' 'CONFIG_AS_CFI_SIGNAL_FRAME=1'
'-D' 'CONFIG_AS_CFI_SECTIONS=1' '-D' 'CONFIG_AS_FXSAVEQ=1' '-D'
'CONFIG_AS_CRC32=1' '-D' 'CONFIG_AS_AVX=1' '-D' 'CONFIG_AS_AVX2=1' '-pipe'
'-Wno-sign-compare' '-fno-asynchronous-unwind-tables' '-mno-sse' '-mno-mmx'
'-mno-sse2' '-mno-3dnow' '-mno-avx' '-fno-delete-null-pointer-checks' '-O2'
'--param' 'allow-store-data-races=0' '-fno-reorder-blocks' '-fno-ipa-cp-clone'
'-fno-partial-inlining' '-Wframe-larger-than=2048' '-fstack-protector'
'-Wno-unused-but-set-variable' '-fno-omit-frame-pointer'
'-fno-optimize-sibling-c

[Bug tree-optimization/64211] New: ICE compiling Linux Kernel net/core/dev.c in dev_change_net_namespace

2014-12-07 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64211

Bug ID: 64211
   Summary: ICE compiling Linux Kernel net/core/dev.c in
dev_change_net_namespace
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com
CC: marxin at gcc dot gnu.org

Created attachment 34211
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34211&action=edit
Preprocessed source

I'm seeing the following ICE:

$ gcc -v -Wp,-MD,net/core/.dev.o.d  -nostdinc -isystem
/home/sasha/gcc-inst/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include
-I./arch/x86/include -Iarch/x86/include/generated  -Iinclude
-I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi
-Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall
-Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m64
-mno-80387 -mno-fp-ret-in-387 -march=native -mno-red-zone -mcmodel=kernel
-funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI
-DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1
-DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1
-pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2
--param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector
-Wno-unused-but-set-variable -fno-omit-frame-pointer
-fno-optimize-sibling-calls -fno-var-tracking-assignments -g -gdwarf-4
-Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow
-fconserve-stack -Werror=implicit-int -Werror=strict-prototypes
-Werror=date-time -DCC_HAVE_ASM_GOTO-D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(dev)"  -D"KBUILD_MODNAME=KBUILD_STR(dev)" -c -o
net/core/.tmp_dev.o net/core/dev.c

Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/home/sasha/gcc-inst/ --with-arch=native
--with-tune=native --enable-languages=c --enable-lto --enable-gold
--enable-stage1-languages=c
Thread model: posix
gcc version 5.0.0 20141207 (experimental) (GCC) 

COLLECT_GCC_OPTIONS='-v' '-nostdinc' '-isystem'
'/home/sasha/gcc-inst/lib/gcc/x86_64-unknown-linux-gnu/5.0.0/include' '-I'
'./arch/x86/include' '-I' 'arch/x86/include/generated' '-I' 'include' '-I'
'./arch/x86/include/uapi' '-I' 'arch/x86/include/generated/uapi' '-I'
'./include/uapi' '-I' 'include/generated/uapi' '-include'
'./include/linux/kconfig.h' '-D' '__KERNEL__' '-Wall' '-Wundef'
'-Wstrict-prototypes' '-Wno-trigraphs' '-fno-strict-aliasing' '-fno-common'
'-Werror=implicit-function-declaration' '-Wno-format-security' '-std=gnu90'
'-m64' '-mno-80387' '-mno-fp-ret-in-387' '-march=native' '-mno-red-zone'
'-mcmodel=kernel' '-funit-at-a-time' '-maccumulate-outgoing-args' '-D'
'CONFIG_X86_X32_ABI' '-D' 'CONFIG_AS_CFI=1' '-D' 'CONFIG_AS_CFI_SIGNAL_FRAME=1'
'-D' 'CONFIG_AS_CFI_SECTIONS=1' '-D' 'CONFIG_AS_FXSAVEQ=1' '-D'
'CONFIG_AS_CRC32=1' '-D' 'CONFIG_AS_AVX=1' '-D' 'CONFIG_AS_AVX2=1' '-pipe'
'-Wno-sign-compare' '-fno-asynchronous-unwind-tables' '-mno-sse' '-mno-mmx'
'-mno-sse2' '-mno-3dnow' '-mno-avx' '-fno-delete-null-pointer-checks' '-O2'
'--param' 'allow-store-data-races=0' '-Wframe-larger-than=2048'
'-fstack-protector' '-Wno-unused-but-set-variable' '-fno-omit-frame-pointer'
'-fno-optimize-sibling-calls' '-fno-var-tracking-assignments' '-g' '-gdwarf-4'
'-Wdeclaration-after-statement' '-Wno-pointer-sign' '-fno-strict-overflow'
'-fconserve-stack' '-Werror=implicit-int' '-Werror=strict-prototypes'
'-Werror=date-time' '-D' 'CC_HAVE_ASM_GOTO' '-D' 'KBUILD_STR(s)=#s' '-D'
'KBUILD_BASENAME=KBUILD_STR(dev)' '-D' 'KBUILD_MODNAME=KBUILD_STR(dev)' '-c'
'-o' 'net/core/.tmp_dev.o'
 /home/sasha/gcc-inst/libex

[Bug c/63279] New: Processes hang inside Linux Kernel built with gcc5

2014-09-16 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63279

Bug ID: 63279
   Summary: Processes hang inside Linux Kernel built with gcc5
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com

After building and booting a Linux Kernel built with gcc5, several processes
would hang and consume 100% CPU, while other work just fine.

For example, /bin/dash would work great but /bin/bash just hangs indefinitely.

This issue was easy enough to bisect, and the offending commit is: 
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=213753


Thanks,
Sasha


[Bug c/63279] Processes hang inside Linux Kernel built with gcc5

2014-09-16 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63279

--- Comment #2 from Sasha Levin  ---
PR61848 is talking about a "linux kernel boot failure when compiled using
trunk gcc.". In this case, the kernel boots just fine, but it has problem
executing tasks.

I've double checked that for:
svn+ssh://gcc.gnu.org/svn/gcc/trunk@213753

The issue occurs, while for:
svn+ssh://gcc.gnu.org/svn/gcc/trunk@213751

The kernel works fine.


[Bug middle-end/63279] [5 Regression] Processes hang inside Linux Kernel built with gcc5

2014-09-16 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63279

--- Comment #4 from Sasha Levin  ---
Here's what I see with 'make V=1' on the kernel:

gcc -Wp,-MD,kernel/.exec_domain.o.d  -nostdinc -isystem
/home/sasha/gcc-inst/lib/gcc/x86_64-unknown-linux-gnu/4.10.0/include
-I./arch/x86/include -Iarch/x86/include/generated  -Iinclude
-I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi
-Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall
-Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security -m64 -mno-mmx
-mno-sse -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3
-march=native -mno-red-zone -mcmodel=kernel -funit-at-a-time
-maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1
-DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1
-DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe
-Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2
-mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2
--param=allow-store-data-races=0 -fno-reorder-blocks -fno-ipa-cp-clone
-fno-partial-inlining -Wframe-larger-than=2048 -fstack-protector
-Wno-unused-but-set-variable -fno-omit-frame-pointer
-fno-optimize-sibling-calls -fno-var-tracking-assignments -g -gdwarf-4 -pg
-mfentry -DCC_USING_FENTRY -fno-inline-functions-called-once
-Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow
-fconserve-stack -Werror=implicit-int -Werror=strict-prototypes
-Werror=date-time -DCC_HAVE_ASM_GOTO-D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(exec_domain)" 
-D"KBUILD_MODNAME=KBUILD_STR(exec_domain)" -c -o kernel/.tmp_exec_domain.o
kernel/exec_domain.c


[Bug middle-end/63279] [5 Regression] Processes hang inside Linux Kernel built with gcc5

2014-09-18 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63279

Sasha Levin  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #6 from Sasha Levin  ---
The fix from PR61848 seems to have done the trick. Thanks!

*** This bug has been marked as a duplicate of bug 61848 ***


[Bug middle-end/61848] [5 Regression] a previous declaration causes the section attribute to be lost

2014-09-18 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61848

Sasha Levin  changed:

   What|Removed |Added

 CC||sasha.levin at oracle dot com

--- Comment #13 from Sasha Levin  ---
*** Bug 63279 has been marked as a duplicate of this bug. ***


[Bug c/63481] New: "Improve prepare_shrink_wrap to sink more instructions" causes linux kernel failure

2014-10-07 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63481

Bug ID: 63481
   Summary: "Improve prepare_shrink_wrap to sink more
instructions" causes linux kernel failure
   Product: gcc
   Version: 5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com

Created attachment 33663
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33663&action=edit
good/bad kernel disasm

I've updated gcc (since two weeks ago) and now my kernel fails to boot with:

[   38.896180] kernel BUG at block/blk-flush.c:212!
[   38.897035] invalid opcode:  [#1] PREEMPT SMP DEBUG_PAGEALLOC KASAN
[   38.898179] Dumping ftrace buffer:
[   38.898666](ftrace buffer empty)
[   38.899186] Modules linked in:
[   38.899562] CPU: 6 PID: 0 Comm: swapper/6 Not tainted
3.17.0-rc7-next-20141003-sasha-00051-g8905629 #1329
[   38.900882] task: 8800366f ti: 8800366e4000 task.ti:
8800366e4000
[   38.901745] RIP: blk_flush_complete_seq (block/blk-flush.c:212)
[   38.903026] RSP: :8801c3a03e08  EFLAGS: 00010002
[   38.903717] RAX: 0008 RBX: 88003353 RCX:
0003
[   38.904619] RDX: dfffe900 RSI: 8800334f4000 RDI:
8800335300a0
[   38.905102] RBP: 8801c3a03e58 R08:  R09:

[   38.905102] R10: 1100b1888030 R11:  R12:
8800334f4000
[   38.905102] R13:  R14: 8800335300a0 R15:

[   38.905102] FS:  () GS:8801c3a0()
knlGS:
[   38.905102] CS:  0010 DS:  ES:  CR0: 8005003b
[   38.905102] CR2: a022d0c0 CR3: 21a22000 CR4:
06a0
[   38.905102] Stack:
[   38.905102]  8800366e4000 880033530030 8802e3bd1f70
0007
[   38.905102]  9bfc6c23 8800335300a8 8800334f4000

[   38.905102]  8800334f3f78 8800334f4020 8801c3a03ec8
9bfc6d4d
[   38.905102] Call Trace:
[   38.905102]   
[   38.905102] ? flush_end_io (block/blk-flush.c:230)
[   38.905102] flush_end_io (block/blk-flush.c:243 (discriminator 2))
[   38.905102] blk_mq_end_request (block/blk-mq.c:303)
[   38.905102] virtblk_request_done (drivers/block/virtio_blk.c:139)
[   38.905102] __blk_mq_complete_request_remote (block/blk-mq.c:311)
[   38.905102] ? blkdev_issue_zeroout (block/blk-mq.c:307)
[   38.905102] flush_smp_call_function_queue (kernel/smp.c:129 (discriminator
3) kernel/smp.c:254 (discriminator 3))
[   38.905102] ? preempt_count_add (kernel/sched/core.c:2631)
[   38.905102] generic_smp_call_function_single_interrupt (kernel/smp.c:208)
[   38.905102] smp_call_function_single_interrupt (arch/x86/kernel/smp.c:317
arch/x86/kernel/smp.c:323)
[   38.905102] call_function_single_interrupt (arch/x86/kernel/entry_64.S:1020)
[   38.905102]   
[   38.905102] ? native_safe_halt (./arch/x86/include/asm/irqflags.h:50)
[   38.905102] ? trace_hardirqs_on (kernel/locking/lockdep.c:2609)
[   38.905102] default_idle (./arch/x86/include/asm/paravirt.h:111
arch/x86/kernel/process.c:313)
[   38.905102] arch_cpu_idle (arch/x86/kernel/process.c:305)
[   38.905102] cpu_idle_loop (kernel/sched/idle.c:120 kernel/sched/idle.c:226)
[   38.905102] cpu_startup_entry (??:?)
[   38.905102] start_secondary (arch/x86/kernel/smpboot.c:240)
[ 38.905102] Code: 00 0f 84 ec 00 00 00 31 f6 48 89 df e8 aa 90 00 00 4c 89 e7
e8 92 91 00 00 44 89 e8 48 83 c4 28 5b 41 5c 41 5d 41 5e 41 5f 5d c3 <0f> 0b 66
0f 1f 44 00 00 4c 8d ab a8 00 00 00 4d 8d 7c 24 30 4c 
All code

   0:00 0fadd%cl,(%rdi)
   2:84 ectest   %ch,%ah
   4:00 00add%al,(%rax)
   6:00 31add%dh,(%rcx)
   8:f6   (bad)  
   9:48 89 df mov%rbx,%rdi
   c:e8 aa 90 00 00   callq  0x90bb
  11:4c 89 e7 mov%r12,%rdi
  14:e8 92 91 00 00   callq  0x91ab
  19:44 89 e8 mov%r13d,%eax
  1c:48 83 c4 28  add$0x28,%rsp
  20:5b   pop%rbx
  21:41 5cpop%r12
  23:41 5dpop%r13
  25:41 5epop%r14
  27:41 5fpop%r15
  29:5d   pop%rbp
  2a:c3   retq   
  2b:*0f 0bud2<-- trapping instruction
  2d:66 0f 1f 44 00 00nopw   0x0(%rax,%rax,1)
  33:4c 8d ab a8 00 00 00 lea0xa8(%rbx),%r13
  3a:4d 8d 7c 24 30   lea0x30(%r12),%r15
  3f:4c   rex.WR
...

Code starting with the faulting instruction
===

[Bug lto/69254] New: internal compiler error: in streamer_get_builtin_tree, at tree-streamer-in.c:1144

2016-01-12 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69254

Bug ID: 69254
   Summary: internal compiler error: in streamer_get_builtin_tree,
at tree-streamer-in.c:1144
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com
  Target Milestone: ---

Hi,

I've tried to build the linux kernel with lto (CONFIG_LTO=y), but it seems to
fail with the following:

+ exec gcc -nostdlib -flto=128 -flto -fno-toplevel-reorder -fno-fat-lto-objects
-fwhole-program -fipa-cp-clone -g -gdwarf-4 -O2 -fno-strict-aliasing
-fno-common -falign-jumps=1 -falign-loops=1 -funit-at-a-time
-fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks
-fstack-protector-strong -fno-omit-frame-pointer -fno-optimize-sibling-calls
-fno-var-tracking-assignments -fno-inline-functions-called-once
-fno-strict-overflow -fconserve-stack -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-mno-avx -m64 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3
-mskip-rax-setup -march=core2 -mno-red-zone -mcmodel=kernel
-maccumulate-outgoing-args -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-Werror-implicit-function-declaration -Wno-format-security -Wno-sign-compare
-Wframe-larger-than=2048 -Wno-unused-but-set-variable
-Wdeclaration-after-statement -Wno-pointer-sign -Werror=implicit-int
-Werror=strict-prototypes -Werror=date-time -Wl,-m,elf_x86_64 -Wl,--emit-relocs
-Wl,--build-id -Wl,-X -o .tmp_vmlinux1 -Wl,-T,./arch/x86/kernel/vmlinux.lds
arch/x86/kernel/head_64.o arch/x86/kernel/head64.o arch/x86/kernel/head.o
init/built-in.o -Wl,--start-group usr/built-in.o arch/x86/built-in.o
kernel/built-in.o certs/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o
security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a
arch/x86/lib/lib.a lib/built-in.o arch/x86/lib/built-in.o drivers/built-in.o
sound/built-in.o firmware/built-in.o arch/x86/pci/built-in.o
arch/x86/oprofile/built-in.o arch/x86/power/built-in.o
arch/x86/video/built-in.o arch/x86/ras/built-in.o net/built-in.o
virt/built-in.o -Wl,--end-group
lto1: internal compiler error: in streamer_get_builtin_tree, at
tree-streamer-in.c:1144
0xc14842 streamer_get_builtin_tree(lto_input_block*, data_in*)
../../gcc/tree-streamer-in.c:1144
0x8c51c4 lto_input_tree_1(lto_input_block*, data_in*, LTO_tags, unsigned int)
../../gcc/lto-streamer-in.c:1419
0x8c53a9 lto_input_scc(lto_input_block*, data_in*, unsigned int*, unsigned
int*)
../../gcc/lto-streamer-in.c:1347
0x5ce316 lto_read_decls
../../gcc/lto/lto.c:1698
0x5d0f1d lto_file_finalize
../../gcc/lto/lto.c:2043
0x5d0f1d lto_create_files_from_ids
../../gcc/lto/lto.c:2053
0x5d0f1d lto_file_read
../../gcc/lto/lto.c:2094
0x5d0f1d read_cgraph_and_symbols
../../gcc/lto/lto.c:2804
0x5d0f1d lto_main()
../../gcc/lto/lto.c:3304
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.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
My gcc version is at trunk:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/sasha/gcc-inst/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/home/sasha/gcc-inst/ --with-arch=native
--with-tune=native --enable-languages=c --enable-lto --enable-gold
--enable-stage1-languages=c
Thread model: posix
gcc version 6.0.0 20160112 (experimental) (GCC)

[Bug lto/69254] internal compiler error: in streamer_get_builtin_tree, at tree-streamer-in.c:1144

2016-01-13 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69254

--- Comment #2 from Sasha Levin  ---
Created attachment 37337
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37337&action=edit
preprocessed source

[Bug lto/69254] internal compiler error: in streamer_get_builtin_tree, at tree-streamer-in.c:1144

2016-01-13 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69254

--- Comment #3 from Sasha Levin  ---
I didn't get all the way through, but with the attached preprocessed source
file:

$ gcc -flto -flto=128 -Wp,-MD,init/.calibrate.o.d  -nostdinc -D__KERNEL__ -Wall
-Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -mno-sse
-mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1
-mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup
-march=core2 -mno-red-zone -mcmodel=kernel -funit-at-a-time
-maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1
-DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1
-DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1
-DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare
-fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -O2
--param=allow-store-data-races=0 -Wframe-larger-than=2048
-fstack-protector-strong -Wno-unused-but-set-variable -fno-omit-frame-pointer
-fno-optimize-sibling-calls -fno-var-tracking-assignments -g -gdwarf-4
-fno-inline-functions-called-once -Wdeclaration-after-statement
-Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int
-Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO -flto
-fno-toplevel-reorder -fno-fat-lto-objects -fipa-cp-clone  
-fsanitize=kernel-address -fasan-shadow-offset=0xdc00 --param
asan-stack=1 --param asan-globals=1 --param
asan-instrumentation-with-call-threshold=1-fsanitize=shift 
-fsanitize=integer-divide-by-zero  -fsanitize=unreachable  -fsanitize=vla-bound
 -fsanitize=null  -fsanitize=signed-integer-overflow  -fsanitize=bounds 
-fsanitize=object-size  -fsanitize=returns-nonnull-attribute  -fsanitize=bool 
-fsanitize=enum  -fsanitize-coverage=trace-pc -c -o test test.c; gcc -flto
-flto=128 test
lto1: internal compiler error: in streamer_get_builtin_tree, at
tree-streamer-in.c:1144
0xc14842 streamer_get_builtin_tree(lto_input_block*, data_in*)
../../gcc/tree-streamer-in.c:1144
0x8c51c4 lto_input_tree_1(lto_input_block*, data_in*, LTO_tags, unsigned int)
../../gcc/lto-streamer-in.c:1419
0x8c53a9 lto_input_scc(lto_input_block*, data_in*, unsigned int*, unsigned
int*)
../../gcc/lto-streamer-in.c:1347
0x5ce316 lto_read_decls
../../gcc/lto/lto.c:1698
0x5d0f1d lto_file_finalize
../../gcc/lto/lto.c:2043
0x5d0f1d lto_create_files_from_ids
../../gcc/lto/lto.c:2053
0x5d0f1d lto_file_read
../../gcc/lto/lto.c:2094
0x5d0f1d read_cgraph_and_symbols
../../gcc/lto/lto.c:2804
0x5d0f1d lto_main()
../../gcc/lto/lto.c:3304
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status

[Bug c/67330] New: ICE handling weak attributes

2015-08-23 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67330

Bug ID: 67330
   Summary: ICE handling weak attributes
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sasha.levin at oracle dot com
  Target Milestone: ---

Created attachment 36248
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36248&action=edit
Preprocessed source

Hi,

I'm seeing the following ICE when compiling the kernel's kernel/sched/core.c:

kernel/sched/core.c:5925:1: note: in expansion of macro ‘DEFINE_PER_CPU’
 DEFINE_PER_CPU(struct sched_domain *, sd_llc);
 ^
0x63552c symtab_node::get(tree_node const*)
../../gcc/cgraph.h:370
0x63552c handle_weak_attribute
../../gcc/c-family/c-common.c:8332
0x5af16b decl_attributes(tree_node**, tree_node*, int)
../../gcc/attribs.c:557
0x5cb3da start_decl(c_declarator*, c_declspecs*, bool, tree_node*)
../../gcc/c/c-decl.c:4547
0x61d140 c_parser_declaration_or_fndef
../../gcc/c/c-parser.c:1828
0x62168d c_parser_compound_statement_nostart
../../gcc/c/c-parser.c:4622
0x621cbe c_parser_compound_statement
../../gcc/c/c-parser.c:4533
0x61dc27 c_parser_declaration_or_fndef
../../gcc/c/c-parser.c:1966
0x627e1f c_parser_external_declaration
../../gcc/c/c-parser.c:1436
0x6286d9 c_parser_translation_unit
../../gcc/c/c-parser.c:1323
0x6286d9 c_parse_file()
../../gcc/c/c-parser.c:15449
0x684fa2 c_common_parse_file()
../../gcc/c-family/c-opts.c:1058
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.


I've bisected it down to:

commit 8e857c4151f8f0aae992f9b5f22ee5b4c1cc1c73  
Author: hubicka   
Date:   Fri Sep 19 23:56:52 2014 +  

PR c++/61825  
* c-family/c-common.c (handle_alias_ifunc_attribute): Check  
that visibility change is possible  
(handle_weakref_attribute): Likewise.  
* cgraph.h (symtab_node): Add method get_create and  
field refuse_visibility_changes.  
(symtab_node::get_create): New method.  
* fold-const.c (tree_single_nonzero_warnv_p): Use get_create.  
* varasm.c (mark_weak): Verify that visibility change is  
possible.  

* gcc.dg/tree-ssa/nonzero-1.c: Require error to be output.  


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215409
138bc75d-0d04-0410-961f-82ee72b054a4

Attached a preprocessed source file.

[Bug middle-end/67330] ICE handling weak attributes

2015-08-23 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67330

--- Comment #3 from Sasha Levin  ---
This is the -v invocation:

Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/home/sasha/gcc-inst/ --with-arch=native
--with-tune=native --enable-languages=c --enable-lto --enable-gold
--enable-stage1-languages=c
Thread model: posix
gcc version 6.0.0 20150823 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-nostdinc' '-isystem'
'/home/sasha/gcc-inst/lib/gcc/x86_64-pc-linux-gnu/6.0.0/include' '-I'
'./arch/x86/include' '-I' 'arch/x86/include/generated/uapi' '-I'
'arch/x86/include/generated' '-I' 'include' '-I' './arch/x86/include/uapi' '-I'
'arch/x86/include/generated/uapi' '-I' './include/uapi' '-I'
'include/generated/uapi' '-include' './include/linux/kconfig.h' '-D'
'__KERNEL__' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wno-trigraphs'
'-fno-strict-aliasing' '-fno-common' '-Werror=implicit-function-declaration'
'-Wno-format-security' '-std=gnu90' '-mno-sse' '-mno-mmx' '-mno-sse2'
'-mno-3dnow' '-mno-avx' '-m64' '-falign-jumps=1' '-falign-loops=1' '-mno-80387'
'-mno-fp-ret-in-387' '-mpreferred-stack-boundary=3' '-mskip-rax-setup'
'-march=native' '-mno-red-zone' '-mcmodel=kernel' '-funit-at-a-time'
'-maccumulate-outgoing-args' '-D' 'CONFIG_X86_X32_ABI' '-D'
'CONFIG_AS_FXSAVEQ=1' '-D' 'CONFIG_AS_SSSE3=1' '-D' 'CONFIG_AS_CRC32=1' '-D'
'CONFIG_AS_AVX=1' '-D' 'CONFIG_AS_AVX2=1' '-pipe' '-Wno-sign-compare'
'-fno-asynchronous-unwind-tables' '-fno-delete-null-pointer-checks' '-O2'
'--param' 'allow-store-data-races=0' '-fno-reorder-blocks' '-fno-ipa-cp-clone'
'-fno-partial-inlining' '-Wframe-larger-than=2048' '-fstack-protector'
'-Wno-unused-but-set-variable' '-fno-omit-frame-pointer'
'-fno-optimize-sibling-calls' '-fno-var-tracking-assignments' '-g' '-gdwarf-4'
'-pg' '-mfentry' '-D' 'CC_USING_FENTRY' '-fno-inline-functions-called-once'
'-Wdeclaration-after-statement' '-Wno-pointer-sign' '-fno-strict-overflow'
'-fconserve-stack' '-Werror=implicit-int' '-Werror=strict-prototypes'
'-Werror=date-time' '-D' 'CC_HAVE_ASM_GOTO' '-fsanitize=kernel-address'
'-fasan-shadow-offset=0xdc00' '--param' 'asan-stack=1' '--param'
'asan-globals=1' '--param' 'asan-instrumentation-with-call-threshold=1'
'-D' 'KBUILD_STR(s)=#s' '-D' 'KBUILD_BASENAME=KBUILD_STR(core)' '-D'
'KBUILD_MODNAME=KBUILD_STR(core)' '-c' '-o' 'kernel/sched/.tmp_core.o'
 /home/sasha/gcc-inst/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/cc1 -quiet
-nostdinc -v -I ./arch/x86/include -I arch/x86/include/generated/uapi -I
arch/x86/include/generated -I include -I ./arch/x86/include/uapi -I
arch/x86/include/generated/uapi -I ./include/uapi -I include/generated/uapi
-imultiarch x86_64-linux-gnu -D __KERNEL__ -D CONFIG_X86_X32_ABI -D
CONFIG_AS_FXSAVEQ=1 -D CONFIG_AS_SSSE3=1 -D CONFIG_AS_CRC32=1 -D
CONFIG_AS_AVX=1 -D CONFIG_AS_AVX2=1 -D CC_USING_FENTRY -D CC_HAVE_ASM_GOTO -D
KBUILD_STR(s)=#s -D KBUILD_BASENAME=KBUILD_STR(core) -D
KBUILD_MODNAME=KBUILD_STR(core) -isystem
/home/sasha/gcc-inst/lib/gcc/x86_64-pc-linux-gnu/6.0.0/include -include
./include/linux/kconfig.h -MD kernel/sched/.core.o.d kernel/sched/core.c
-march=nehalem -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -mcx16
-msahf -mno-movbe -mno-aes -mno-sha -mno-pclmul -mpopcnt -mno-abm -mno-lwp
-mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2
-msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c
-mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt
-mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1
-mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw
-mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-pcommit
-mno-mwaitx --param l1-cache-size=32 --param l1-cache-line-size=64 --param
l2-cache-size=24576 -mtune=nehalem -quiet -dumpbase core.c -mno-sse -mno-mmx
-mno-sse2 -mno-3dnow -mno-avx -m64 -mno-80387 -mno-fp-ret-in-387
-mpreferred-stack-boundary=3 -mskip-rax-setup -mno-red-zone -mcmodel=kernel
-maccumulate-outgoing-args -mfentry -auxbase-strip kernel/sched/.tmp_core.o -g
-gdwarf-4 -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-Werror=implicit-function-declaration -Wno-format-security -Wno-sign-compare
-Wframe-larger-than=2048 -Wno-unused-but-set-variable
-Wdeclaration-after-statement -Wno-pointer-sign -Werror=implicit-int
-Werror=strict-prototypes -Werror=date-time -std=gnu90 -version -p
-fno-strict-aliasing -fno-common -falign-jumps=1 -falign-loops=1
-funit-at-a-time -fno-asynchronous-unwind-tables
-fno-delete-null-pointer-checks -fno-reorder-blocks -fno-ipa-cp-clone
-fno-partial-inlining -fstack-protector -fno-omit-frame-pointer
-fno-optimize-sibling-calls -fno-var-tracking-assignments
-fno-inline-functions-called-once -fno-strict-overflow -fconserve-stack
-fsanitize=kernel-address -fasan-shadow-offset=0xdc00 --param
allow-store-data-races=0 --param asan-stack=1 --param asan-globals=1 --param
asan-instrumentation-with-call-th