public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/44555]  New: Pointer evalutions, is that expected ?
@ 2010-06-16  9:18 zilvinas dot valinskas at gmail dot com
  2010-06-16  9:35 ` [Bug c/44555] " schwab at linux-m68k dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: zilvinas dot valinskas at gmail dot com @ 2010-06-16  9:18 UTC (permalink / raw)
  To: gcc-bugs

$ cat ptr.c
#include <stdio.h>

struct a {
        char    b[100];
        int     a;
};

int main(int argc, char *argv[])
{
        struct a *a = NULL;
        void *ptr;

        if (&a->b)
                puts("ok, not null #1");

        if (&a->b == NULL)
                puts("ok, null ? #1");

        ptr = &a->b;
        if (ptr)
                puts("ok, not null #2");

        if (ptr == NULL)
                puts("ok, null ? #2");

        return 0;
}

$ gcc ptr.c -o ptr
$ ./ptr
ok, not null #1
ok, null ? #1
ok, null ? #2

The same results with gcc 4.4.3, gcc 4.5.0 (ubuntu gcc-snapshot package).
Did not try gcc 3.x series.

$ clang ptr.c -o clang-ptr
$ ./clang-ptr 
ok, null ? #1
ok, null ? #2



Tried with gcc 4.4.3:
$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.4.3-4ubuntu5'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--enable-multiarch --enable-linker-build-id --with-system-zlib
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-plugin --enable-objc-gc
--disable-werror --with-arch-32=i486 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)

$ gcc-snapshot -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-snapshot/libexec/gcc/x86_64-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
20100414-0ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs
--enable-languages=c,ada,c++,java,fortran,objc,obj-c++
--prefix=/usr/lib/gcc-snapshot --enable-shared --enable-multiarch
--enable-linker-build-id --with-system-zlib --disable-nls --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin
--enable-gold --with-plugin-ld=ld.gold --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.5-snap/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.5-snap
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.5-snap
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic
--enable-checking=yes --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.5.0 (Ubuntu 20100414-0ubuntu1) 

$ clang -v
clang version 1.1 (branches/release_27)
Target: x86_64-pc-linux-gnu
Thread model: posix


-- 
           Summary: Pointer evalutions, is that expected ?
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zilvinas dot valinskas at gmail dot com


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


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

* [Bug c/44555] Pointer evalutions, is that expected ?
  2010-06-16  9:18 [Bug c/44555] New: Pointer evalutions, is that expected ? zilvinas dot valinskas at gmail dot com
@ 2010-06-16  9:35 ` schwab at linux-m68k dot org
  2010-06-16 10:29 ` zilvinas dot valinskas at gmail dot com
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: schwab at linux-m68k dot org @ 2010-06-16  9:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from schwab at linux-m68k dot org  2010-06-16 09:35 -------
The first operand of -> must be a valid pointer to an object.


-- 

schwab at linux-m68k dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug c/44555] Pointer evalutions, is that expected ?
  2010-06-16  9:18 [Bug c/44555] New: Pointer evalutions, is that expected ? zilvinas dot valinskas at gmail dot com
  2010-06-16  9:35 ` [Bug c/44555] " schwab at linux-m68k dot org
@ 2010-06-16 10:29 ` zilvinas dot valinskas at gmail dot com
  2010-06-16 10:44 ` redi at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: zilvinas dot valinskas at gmail dot com @ 2010-06-16 10:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from zilvinas dot valinskas at gmail dot com  2010-06-16 10:29 -------
I don't agree. This is an optimizer bug ("dead code elimination" don't know
much of GCC). Consider that there is a function like this:


$ cat ptr.h
struct a {
        char    b[100];
        int     a;
};

$ cat ptr.c

$ cat ptr.c 
#include <stdio.h>
#include "ptr.h"

int main(int argc, char *argv[])
{
        struct a *a = NULL;

        function(a);
        return 0;
}


$ cat func.c 
#include <stdio.h>
#include "ptr.h"

void function(struct a *a)
{
        void *ptr;

        if (&a->b)
                puts("ok, not null #1");

        if (&a->b == NULL)
                puts("ok, null ? #1");

        ptr = &a->b;
        if (ptr)
                puts("ok, not null #2");

        if (ptr == NULL)
                puts("ok, null ? #2");
}

$ gcc ptr.c func.c -o ptr
$ ./ptr

$ ./ptr 
ok, not null #1
ok, null ? #1
ok, null ? #2


Still the same problem (maybe not a problem). But how does GCC is able to tell
that in this particular case func() is invoked with a NULL pointer as parameter
(not valid pointer) and eliminates code just like that ???

Mind you this code is an approximation of bug I was tracking not so long time
ago.


-- 

zilvinas dot valinskas at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


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


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

* [Bug c/44555] Pointer evalutions, is that expected ?
  2010-06-16  9:18 [Bug c/44555] New: Pointer evalutions, is that expected ? zilvinas dot valinskas at gmail dot com
  2010-06-16  9:35 ` [Bug c/44555] " schwab at linux-m68k dot org
  2010-06-16 10:29 ` zilvinas dot valinskas at gmail dot com
@ 2010-06-16 10:44 ` redi at gcc dot gnu dot org
  2010-06-16 10:53 ` schwab at linux-m68k dot org
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: redi at gcc dot gnu dot org @ 2010-06-16 10:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from redi at gcc dot gnu dot org  2010-06-16 10:43 -------
can you say "undefined behaviour" ?


-- 


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


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

* [Bug c/44555] Pointer evalutions, is that expected ?
  2010-06-16  9:18 [Bug c/44555] New: Pointer evalutions, is that expected ? zilvinas dot valinskas at gmail dot com
                   ` (2 preceding siblings ...)
  2010-06-16 10:44 ` redi at gcc dot gnu dot org
@ 2010-06-16 10:53 ` schwab at linux-m68k dot org
  2010-06-16 11:23 ` rguenth at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: schwab at linux-m68k dot org @ 2010-06-16 10:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from schwab at linux-m68k dot org  2010-06-16 10:53 -------
Undefined behaviour.


-- 

schwab at linux-m68k dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug c/44555] Pointer evalutions, is that expected ?
  2010-06-16  9:18 [Bug c/44555] New: Pointer evalutions, is that expected ? zilvinas dot valinskas at gmail dot com
                   ` (3 preceding siblings ...)
  2010-06-16 10:53 ` schwab at linux-m68k dot org
@ 2010-06-16 11:23 ` rguenth at gcc dot gnu dot org
  2010-06-16 11:31 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-16 11:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2010-06-16 11:23 -------
I'd argue it's a QOI issue that the C frontend via
c_objc_common_truthvalue_conversion should not convert

  if (&a->b)

to

  if (0)

if the offset of b is zero.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|INVALID                     |


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


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

* [Bug c/44555] Pointer evalutions, is that expected ?
  2010-06-16  9:18 [Bug c/44555] New: Pointer evalutions, is that expected ? zilvinas dot valinskas at gmail dot com
                   ` (4 preceding siblings ...)
  2010-06-16 11:23 ` rguenth at gcc dot gnu dot org
@ 2010-06-16 11:31 ` rguenth at gcc dot gnu dot org
  2010-06-16 11:36 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-16 11:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2010-06-16 11:31 -------
Mine.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-06-16 11:31:09
               date|                            |


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


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

* [Bug c/44555] Pointer evalutions, is that expected ?
  2010-06-16  9:18 [Bug c/44555] New: Pointer evalutions, is that expected ? zilvinas dot valinskas at gmail dot com
                   ` (5 preceding siblings ...)
  2010-06-16 11:31 ` rguenth at gcc dot gnu dot org
@ 2010-06-16 11:36 ` rguenth at gcc dot gnu dot org
  2010-06-16 14:11 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-16 11:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2010-06-16 11:35 -------
Obvious patch, removing the premature (and bogus) optimization:

Index: c-common.c
===================================================================
--- c-common.c  (revision 160826)
+++ c-common.c  (working copy)
@@ -3825,23 +3825,7 @@ c_common_truthvalue_conversion (location
                        inner);
            return truthvalue_true_node;
          }
-
-       /* If we still have a decl, it is possible for its address to
-          be NULL, so we cannot optimize.  */
-       if (DECL_P (inner))
-         {
-           gcc_assert (DECL_WEAK (inner));
-           break;
-         }
-
-       if (TREE_SIDE_EFFECTS (inner))
-         {
-           expr = build2 (COMPOUND_EXPR, truthvalue_type_node,
-                          inner, truthvalue_true_node);
-           goto ret;
-         }
-       else
-         return truthvalue_true_node;
+       break;
       }

     case COMPLEX_EXPR:


-- 


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


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

* [Bug c/44555] Pointer evalutions, is that expected ?
  2010-06-16  9:18 [Bug c/44555] New: Pointer evalutions, is that expected ? zilvinas dot valinskas at gmail dot com
                   ` (6 preceding siblings ...)
  2010-06-16 11:36 ` rguenth at gcc dot gnu dot org
@ 2010-06-16 14:11 ` rguenth at gcc dot gnu dot org
  2010-06-16 14:13 ` [Bug c/44555] [4.3/4.4/4.5 Regression] " rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-16 14:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rguenth at gcc dot gnu dot org  2010-06-16 14:11 -------
Subject: Bug 44555

Author: rguenth
Date: Wed Jun 16 14:11:03 2010
New Revision: 160836

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160836
Log:
2010-06-16  Richard Guenther  <rguenther@suse.de>

        PR c/44555
        * c-common.c (c_common_truthvalue_conversion): Remove
        premature and wrong optimization concering ADDR_EXPRs.

        * gcc.c-torture/execute/pr44555.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.c-torture/execute/pr44555.c
Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c/44555] [4.3/4.4/4.5 Regression] Pointer evalutions, is that expected ?
  2010-06-16  9:18 [Bug c/44555] New: Pointer evalutions, is that expected ? zilvinas dot valinskas at gmail dot com
                   ` (7 preceding siblings ...)
  2010-06-16 14:11 ` rguenth at gcc dot gnu dot org
@ 2010-06-16 14:13 ` rguenth at gcc dot gnu dot org
  2010-06-24 21:43 ` rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-16 14:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenth at gcc dot gnu dot org  2010-06-16 14:12 -------
Fixed on trunk, 3.3 works, so this is a regression.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |4.1.2
      Known to work|                            |3.3.3 4.6.0
            Summary|Pointer evalutions, is that |[4.3/4.4/4.5 Regression]
                   |expected ?                  |Pointer evalutions, is that
                   |                            |expected ?
   Target Milestone|---                         |4.3.6


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


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

* [Bug c/44555] [4.3/4.4/4.5 Regression] Pointer evalutions, is that expected ?
  2010-06-16  9:18 [Bug c/44555] New: Pointer evalutions, is that expected ? zilvinas dot valinskas at gmail dot com
                   ` (8 preceding siblings ...)
  2010-06-16 14:13 ` [Bug c/44555] [4.3/4.4/4.5 Regression] " rguenth at gcc dot gnu dot org
@ 2010-06-24 21:43 ` rguenth at gcc dot gnu dot org
  2010-06-25 10:36 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-24 21:43 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
           Priority|P3                          |P2


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


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

* [Bug c/44555] [4.3/4.4/4.5 Regression] Pointer evalutions, is that expected ?
  2010-06-16  9:18 [Bug c/44555] New: Pointer evalutions, is that expected ? zilvinas dot valinskas at gmail dot com
                   ` (9 preceding siblings ...)
  2010-06-24 21:43 ` rguenth at gcc dot gnu dot org
@ 2010-06-25 10:36 ` rguenth at gcc dot gnu dot org
  2010-07-27 13:08 ` [Bug c/44555] [4.3/4.4 " rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-25 10:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from rguenth at gcc dot gnu dot org  2010-06-25 10:35 -------
Subject: Bug 44555

Author: rguenth
Date: Fri Jun 25 10:35:40 2010
New Revision: 161370

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161370
Log:
2010-06-25  Richard Guenther  <rguenther@suse.de>

        Backport from mainline
        2010-06-16  Richard Guenther  <rguenther@suse.de>

        PR c/44555
        * c-common.c (c_common_truthvalue_conversion): Remove
        premature and wrong optimization concering ADDR_EXPRs.

        * gcc.c-torture/execute/pr44555.c: New testcase.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/gcc.c-torture/execute/pr44555.c
Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/c-common.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c/44555] [4.3/4.4 Regression] Pointer evalutions, is that expected ?
  2010-06-16  9:18 [Bug c/44555] New: Pointer evalutions, is that expected ? zilvinas dot valinskas at gmail dot com
                   ` (10 preceding siblings ...)
  2010-06-25 10:36 ` rguenth at gcc dot gnu dot org
@ 2010-07-27 13:08 ` rguenth at gcc dot gnu dot org
  2010-08-11 13:00 ` [Bug c/44555] [4.3 " rguenth at gcc dot gnu dot org
  2010-08-11 13:00 ` rguenth at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-27 13:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from rguenth at gcc dot gnu dot org  2010-07-27 13:07 -------
Subject: Bug 44555

Author: rguenth
Date: Tue Jul 27 13:07:28 2010
New Revision: 162566

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162566
Log:
2010-07-27  Richard Guenther  <rguenther@suse.de>

        PR c/44555
        * c-common.c (c_common_truthvalue_conversion): Remove
        premature and wrong optimization concering ADDR_EXPRs.

        * gcc.c-torture/execute/pr44555.c: New testcase.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/execute/pr44555.c
Modified:
    branches/gcc-4_4-branch/gcc/ChangeLog
    branches/gcc-4_4-branch/gcc/c-common.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c/44555] [4.3 Regression] Pointer evalutions, is that expected ?
  2010-06-16  9:18 [Bug c/44555] New: Pointer evalutions, is that expected ? zilvinas dot valinskas at gmail dot com
                   ` (11 preceding siblings ...)
  2010-07-27 13:08 ` [Bug c/44555] [4.3/4.4 " rguenth at gcc dot gnu dot org
@ 2010-08-11 13:00 ` rguenth at gcc dot gnu dot org
  2010-08-11 13:00 ` rguenth at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-08-11 13:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from rguenth at gcc dot gnu dot org  2010-08-11 13:00 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|3.3.3 4.4.5 4.5.1 4.6.0     |3.3.3 4.3.6 4.4.5 4.5.1
                   |                            |4.6.0
         Resolution|                            |FIXED


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


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

* [Bug c/44555] [4.3 Regression] Pointer evalutions, is that expected ?
  2010-06-16  9:18 [Bug c/44555] New: Pointer evalutions, is that expected ? zilvinas dot valinskas at gmail dot com
                   ` (12 preceding siblings ...)
  2010-08-11 13:00 ` [Bug c/44555] [4.3 " rguenth at gcc dot gnu dot org
@ 2010-08-11 13:00 ` rguenth at gcc dot gnu dot org
  13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-08-11 13:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from rguenth at gcc dot gnu dot org  2010-08-11 13:00 -------
Subject: Bug 44555

Author: rguenth
Date: Wed Aug 11 12:59:47 2010
New Revision: 163098

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163098
Log:
2010-08-11  Richard Guenther  <rguenther@suse.de>

        PR c/44555
        * c-common.c (c_common_truthvalue_conversion): Remove
        premature and wrong optimization concering ADDR_EXPRs.

        * gcc.c-torture/execute/pr44555.c: New testcase.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/execute/pr44555.c
Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/c-common.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2010-08-11 13:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-16  9:18 [Bug c/44555] New: Pointer evalutions, is that expected ? zilvinas dot valinskas at gmail dot com
2010-06-16  9:35 ` [Bug c/44555] " schwab at linux-m68k dot org
2010-06-16 10:29 ` zilvinas dot valinskas at gmail dot com
2010-06-16 10:44 ` redi at gcc dot gnu dot org
2010-06-16 10:53 ` schwab at linux-m68k dot org
2010-06-16 11:23 ` rguenth at gcc dot gnu dot org
2010-06-16 11:31 ` rguenth at gcc dot gnu dot org
2010-06-16 11:36 ` rguenth at gcc dot gnu dot org
2010-06-16 14:11 ` rguenth at gcc dot gnu dot org
2010-06-16 14:13 ` [Bug c/44555] [4.3/4.4/4.5 Regression] " rguenth at gcc dot gnu dot org
2010-06-24 21:43 ` rguenth at gcc dot gnu dot org
2010-06-25 10:36 ` rguenth at gcc dot gnu dot org
2010-07-27 13:08 ` [Bug c/44555] [4.3/4.4 " rguenth at gcc dot gnu dot org
2010-08-11 13:00 ` [Bug c/44555] [4.3 " rguenth at gcc dot gnu dot org
2010-08-11 13:00 ` rguenth at gcc dot gnu dot 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).