public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/48124] New: likely wrong code bug
@ 2011-03-14 20:36 regehr at cs dot utah.edu
  2011-03-14 21:53 ` [Bug middle-end/48124] [4.3/4.4/4.5/4.6/4.7 Regression] " jakub at gcc dot gnu.org
                   ` (33 more replies)
  0 siblings, 34 replies; 35+ messages in thread
From: regehr at cs dot utah.edu @ 2011-03-14 20:36 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: likely wrong code bug
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: regehr@cs.utah.edu


[regehr@gamow ~]$ current-gcc -v
Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/uusoc/exports/scratch/regehr/z/compiler-install/gcc-r170949-install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --with-libelf=/usr/local --enable-lto
--prefix=/home/regehr/z/compiler-install/gcc-r170949-install
--program-prefix=r170949- --enable-languages=c,c++
Thread model: posix
gcc version 4.7.0 20110314 (experimental) (GCC) 


[regehr@gamow ~]$ current-gcc -O1 small.c -o small
[regehr@gamow ~]$ ./small 
g_1 = 2
[regehr@gamow ~]$ current-gcc -Os small.c -o small
[regehr@gamow ~]$ ./small 
g_1 = 1
[regehr@gamow ~]$ cat small.c


struct S0 {
  signed f0 : 26;
  signed f1 : 16;
  signed f2 : 10;
  volatile signed f3 : 14;
};

static int g_1 = 1;
static struct S0 g_2 = {0,0,0,1};

int printf(const char *format, ...);

void func_1(void)
{
   g_2.f3 = 0;
   g_1 = 2;
}

int main (int argc, char* argv[])
{
   func_1();
   printf("g_1 = %d\n", g_1);
   return 0;
}


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

end of thread, other threads:[~2013-04-12 16:25 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-14 20:36 [Bug c/48124] New: likely wrong code bug regehr at cs dot utah.edu
2011-03-14 21:53 ` [Bug middle-end/48124] [4.3/4.4/4.5/4.6/4.7 Regression] " jakub at gcc dot gnu.org
2011-03-14 22:09 ` jakub at gcc dot gnu.org
2011-03-15 10:27 ` rguenth at gcc dot gnu.org
2011-03-15 11:09 ` jakub at gcc dot gnu.org
2011-03-15 12:58 ` aldyh at redhat dot com
2011-03-31 15:05 ` jakub at gcc dot gnu.org
2011-04-10 10:43 ` rguenth at gcc dot gnu.org
2011-05-20  7:15 ` jakub at gcc dot gnu.org
2011-06-27 12:28 ` rguenth at gcc dot gnu.org
2012-02-01 12:36 ` [Bug middle-end/48124] [4.4/4.5/4.6/4.7 " rguenth at gcc dot gnu.org
2012-02-01 12:49 ` rguenth at gcc dot gnu.org
2012-02-01 12:59 ` rguenth at gcc dot gnu.org
2012-02-01 13:06 ` rguenth at gcc dot gnu.org
2012-02-01 13:58 ` rguenth at gcc dot gnu.org
2012-02-01 14:17 ` rguenth at gcc dot gnu.org
2012-02-01 14:54 ` rguenth at gcc dot gnu.org
2012-02-01 15:48 ` rguenth at gcc dot gnu.org
2012-02-21 12:04 ` rguenth at gcc dot gnu.org
2012-03-13 13:04 ` [Bug middle-end/48124] [4.5/4.6/4.7/4.8 " jakub at gcc dot gnu.org
2012-03-14 10:59 ` [Bug middle-end/48124] [4.5/4.6/4.7 " rguenth at gcc dot gnu.org
2012-03-14 11:04 ` [Bug middle-end/48124] [4.5/4.6/4.7/4.8 " rguenth at gcc dot gnu.org
2012-05-30 15:24 ` [Bug middle-end/48124] [4.5/4.6/4.7 " rguenth at gcc dot gnu.org
2012-05-30 15:35 ` ebotcazou at gcc dot gnu.org
2012-05-31  9:21 ` rguenther at suse dot de
2012-05-31 10:39 ` ebotcazou at gcc dot gnu.org
2012-05-31 10:43 ` rguenther at suse dot de
2012-05-31 10:49 ` jakub at gcc dot gnu.org
2012-05-31 11:01 ` rguenther at suse dot de
2012-06-01 10:21 ` rguenther at suse dot de
2012-06-03  8:23 ` ebotcazou at gcc dot gnu.org
2012-06-04  8:44 ` rguenth at gcc dot gnu.org
2012-06-04  8:45 ` [Bug middle-end/48124] [4.5/4.6 " rguenth at gcc dot gnu.org
2012-07-02 11:06 ` rguenth at gcc dot gnu.org
2013-04-12 16:25 ` [Bug middle-end/48124] [4.6 " jakub 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).