public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/40692]  New: [4.5 Regression] Endless recursion between fold_ternary and fold_cond_expr_with_comparison
@ 2009-07-08 22:09 jakub at gcc dot gnu dot org
  2009-07-08 23:10 ` [Bug middle-end/40692] " jakub at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-07-08 22:09 UTC (permalink / raw)
  To: gcc-bugs

Linux kernel, in particularly xen-blkfront.c, doesn't compile with GCC trunk.
4.5.0 20090625 was still fine, 4.5.0 20090630 is already wrong.

Simplified testcase:

#define M1(x) (((x) & 0x00000002) ? 0x2 : ((x) & 0x1))
#define M2(x) (((x) & 0x0000000c) ? M1 ((x) >> 2) << 2 : M1 (x))
struct A { char f[1]; };
char a[M2 (4096UL - (long)&((struct A *) 16)->f)];


-- 
           Summary: [4.5 Regression] Endless recursion between fold_ternary
                    and fold_cond_expr_with_comparison
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: jakub at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org


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


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

* [Bug middle-end/40692] [4.5 Regression] Endless recursion between fold_ternary and fold_cond_expr_with_comparison
  2009-07-08 22:09 [Bug middle-end/40692] New: [4.5 Regression] Endless recursion between fold_ternary and fold_cond_expr_with_comparison jakub at gcc dot gnu dot org
@ 2009-07-08 23:10 ` jakub at gcc dot gnu dot org
  2009-07-09 11:19 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-07-08 23:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jakub at gcc dot gnu dot org  2009-07-08 23:09 -------
Caused by r149060.  Will debug tomorrow.
Alternative testcase that doesn't warn about VLA at file scope:
#define M1(x) (((x) & 0x00000002) ? 0x2 : ((x) & 0x1))
#define M2(x) (((x) & 0x0000000c) ? M1 ((x) >> 2) << 2 : M1 (x))
struct A { char f[1]; };
int foo (void)
{
  return M2 (4096UL - (long)&((struct A *) 16UL)->f);
}


-- 


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


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

* [Bug middle-end/40692] [4.5 Regression] Endless recursion between fold_ternary and fold_cond_expr_with_comparison
  2009-07-08 22:09 [Bug middle-end/40692] New: [4.5 Regression] Endless recursion between fold_ternary and fold_cond_expr_with_comparison jakub at gcc dot gnu dot org
  2009-07-08 23:10 ` [Bug middle-end/40692] " jakub at gcc dot gnu dot org
@ 2009-07-09 11:19 ` jakub at gcc dot gnu dot org
  2009-07-09 11:32 ` jakub at gcc dot gnu dot org
  2009-07-23 17:52 ` hjl at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-07-09 11:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2009-07-09 11:19 -------
Subject: Bug 40692

Author: jakub
Date: Thu Jul  9 11:19:22 2009
New Revision: 149418

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149418
Log:
        PR middle-end/40692
        * fold-const.c (fold_cond_expr_with_comparison): Don't replace
        arg1 with arg01 if arg1 is already INTEGER_CST.

        * gcc.c-torture/compile/pr40692.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr40692.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug middle-end/40692] [4.5 Regression] Endless recursion between fold_ternary and fold_cond_expr_with_comparison
  2009-07-08 22:09 [Bug middle-end/40692] New: [4.5 Regression] Endless recursion between fold_ternary and fold_cond_expr_with_comparison jakub at gcc dot gnu dot org
  2009-07-08 23:10 ` [Bug middle-end/40692] " jakub at gcc dot gnu dot org
  2009-07-09 11:19 ` jakub at gcc dot gnu dot org
@ 2009-07-09 11:32 ` jakub at gcc dot gnu dot org
  2009-07-23 17:52 ` hjl at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-07-09 11:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2009-07-09 11:32 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

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


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


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

* [Bug middle-end/40692] [4.5 Regression] Endless recursion between fold_ternary and fold_cond_expr_with_comparison
  2009-07-08 22:09 [Bug middle-end/40692] New: [4.5 Regression] Endless recursion between fold_ternary and fold_cond_expr_with_comparison jakub at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-07-09 11:32 ` jakub at gcc dot gnu dot org
@ 2009-07-23 17:52 ` hjl at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-07-23 17:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from hjl at gcc dot gnu dot org  2009-07-23 17:51 -------
Subject: Bug 40692

Author: hjl
Date: Thu Jul 23 17:50:56 2009
New Revision: 150020

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150020
Log:
2009-07-23  H.J. Lu  <hongjiu.lu@intel.com>

        Backport from mainline:
        2009-07-22  Richard Guenther  <rguenther@suse.de>

        PR c++/40799
        * g++.dg/lookup/using21.C: New testcase.

        2009-07-19  Jan Hubicka  <jh@suse.cz>

        PR tree-optimization/40676
        * gcc.c-torture/compile/pr40676.c: New testcase.

        2009-07-15  Richard Guenther  <rguenther@suse.de>

        PR middle-end/40753
        * gcc.c-torture/compile/pr40753.c: New testcase.

        2009-07-14  Dodji Seketeli  <dodji@redhat.com>

        PR debug/40705
        * g++.dg/debug/dwarf2/typedef1.C: New test.

        PR c++/40357
        * g++.dg/other/typedef3.C: New test.

        2009-07-10  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/40496
        * g++.dg/opt/pr40496.C: New testcase.

        2009-07-09  Jakub Jelinek  <jakub@redhat.com>

        PR middle-end/40692
        * gcc.c-torture/compile/pr40692.c: New test.

        2009-07-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

        PR libfortran/40330
        PR libfortran/40662
        * gfortran.dg/fmt_cache_1.f: New test.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C
      - copied unchanged from r150018,
trunk/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/lookup/using21.C
      - copied unchanged from r150018,
trunk/gcc/testsuite/g++.dg/lookup/using21.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/opt/pr40496.C
      - copied unchanged from r150018, trunk/gcc/testsuite/g++.dg/opt/pr40496.C
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/other/typedef3.C
      - copied unchanged from r150018,
trunk/gcc/testsuite/g++.dg/other/typedef3.C
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr40676.c
      - copied unchanged from r150018,
trunk/gcc/testsuite/gcc.c-torture/compile/pr40676.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr40692.c
      - copied unchanged from r150018,
trunk/gcc/testsuite/gcc.c-torture/compile/pr40692.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/compile/pr40753.c
      - copied unchanged from r150018,
trunk/gcc/testsuite/gcc.c-torture/compile/pr40753.c
    branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/fmt_cache_1.f
      - copied unchanged from r150018,
trunk/gcc/testsuite/gfortran.dg/fmt_cache_1.f
Modified:
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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


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

end of thread, other threads:[~2009-07-23 17:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-08 22:09 [Bug middle-end/40692] New: [4.5 Regression] Endless recursion between fold_ternary and fold_cond_expr_with_comparison jakub at gcc dot gnu dot org
2009-07-08 23:10 ` [Bug middle-end/40692] " jakub at gcc dot gnu dot org
2009-07-09 11:19 ` jakub at gcc dot gnu dot org
2009-07-09 11:32 ` jakub at gcc dot gnu dot org
2009-07-23 17:52 ` hjl 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).