public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/56075] New: [gcc-4.7.1] 64-bit version, -Os eliminate some line of code which working fine in gcc-4.6.2 64-bit version
@ 2013-01-22 12:20 rajendiran.public at gmail dot com
  2013-01-23 10:32 ` [Bug tree-optimization/56075] " rajendiran.public at gmail dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rajendiran.public at gmail dot com @ 2013-01-22 12:20 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56075

             Bug #: 56075
           Summary: [gcc-4.7.1] 64-bit version, -Os eliminate some line of
                    code which working fine in gcc-4.6.2 64-bit version
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rajendiran.public@gmail.com


Created attachment 29247
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29247
C source code

With attached sample C codes, assembly code for C code at LINE-1 is not at all
generated in gcc-4.7.1(64-bit) but gcc-4.6.2(64-bit) generate it correctly.

void fun( struct semaphore *s1,struct semaphore *s2)
{
  ...
 { struct semaphore __mutex = { .lock = (spinlock_t ) { { .rlock = { .raw_lock
= { 0 }, .magic = 0xdead4ead, .owner_cpu = -1, .owner = ((void *)-1L), .dep_map
= { .name = "(*(s1)).lock" } } } }, .count = 1, .wait_list = {
&((*(s1)).wait_list), &((*(s1)).wait_list) }, }; *(s1) = __mutex; }; // LINE-1

 { struct semaphore __mutex = { .lock = (spinlock_t ) { { .rlock = { .raw_lock
= { 0 }, .magic = 0xdead4ead, .owner_cpu = -1, .owner = ((void *)-1L), .dep_map
= { .name = "(*(s2)).lock" } } } }, .count = 1, .wait_list = {
&((*(s2)).wait_list), &((*(s2)).wait_list) }, }; *(s2) = __mutex; };  //LINE-2
 ...
}

Source Code Compiling options in GCC-4.7.1
------------------------------------------

gcc -nostdinc -isystem /usr/lib64/gcc/x86_64-unknown-linux-gnu/4.7.1/include
-I/linux-3.1.7-0/kernel/bld/include/
-I/linux-3.1.7-0/kernel/bld/arch/x86/include -Iarch/x86/include/generated
-Iinclude  -include /linux-3.1.7-0/kernel/bld/include/linux/kconfig.h
-D__KERNEL__ -Os -m64 -fno-strict-aliasing -mno-red-zone
-fno-omit-frame-pointer -fconserve-stack -S nv1.c

Source Code Compiling options in GCC-4.6.2
------------------------------------------

gcc -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.6/include
-I/linux-3.1.7-0/kernel/bld/include/
-I/linux-3.1.7-0/kernel/bld/arch/x86/include -Iarch/x86/include/generated
-Iinclude  -include /linux-3.1.7-0/kernel/bld/include/linux/kconfig.h
-D__KERNEL__ -Os -m64 -fno-strict-aliasing -mno-red-zone
-fno-omit-frame-pointer -fconserve-stack -S nv1.c


GCC-4.7.1 - Build Config
------------------------

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.7.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.7.1/configure --prefix=/tmp/outdir/usr
Thread model: posix
gcc version 4.7.1 (GCC) 



GCC-4.6.2 Build Config
----------------------
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.6/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.6
--enable-ssp --disable-libssp --disable-plugin
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib
--enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --program-suffix=-4.6
--enable-linux-futex --without-system-libunwind --with-arch-32=i586
--with-tune=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.6.2 (SUSE Linux)


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-23 16:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-22 12:20 [Bug tree-optimization/56075] New: [gcc-4.7.1] 64-bit version, -Os eliminate some line of code which working fine in gcc-4.6.2 64-bit version rajendiran.public at gmail dot com
2013-01-23 10:32 ` [Bug tree-optimization/56075] " rajendiran.public at gmail dot com
2013-01-23 11:27 ` jakub at gcc dot gnu.org
2013-01-23 16:35 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).