public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant
@ 2015-05-08  6:04 trippels at gcc dot gnu.org
  2015-05-08  7:37 ` [Bug c/66066] " mpolacek at gcc dot gnu.org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-05-08  6:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

            Bug ID: 66066
           Summary: [6 Regression] r222889 causes bogus error: initializer
                    element is not constant
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

% cat decode.i
int a = -1 << 0 | 0;

 % gcc -c decode.i
decode.i:1:9: error: initializer element is not constant
 int a = -1 << 0 | 0;
         ^


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
@ 2015-05-08  7:37 ` mpolacek at gcc dot gnu.org
  2015-05-08  8:11 ` mpolacek at gcc dot gnu.org
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-05-08  7:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Yes, that is expected (in C99!).  See
<https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01946.html>.  New tests
c90-left-shift-1.c and c99-left-shift-1.c explicitly test such behavior.


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
  2015-05-08  7:37 ` [Bug c/66066] " mpolacek at gcc dot gnu.org
@ 2015-05-08  8:11 ` mpolacek at gcc dot gnu.org
  2015-05-08 10:49 ` rguenth at gcc dot gnu.org
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-05-08  8:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
The reason is that -1 << 0 is UB in C99, and we should reject the program only
when the invalid shift is happening in a context where a constant expression is
required.

But if it turns out to break too many packages, I guess we'll have to revisit
;(.


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
  2015-05-08  7:37 ` [Bug c/66066] " mpolacek at gcc dot gnu.org
  2015-05-08  8:11 ` mpolacek at gcc dot gnu.org
@ 2015-05-08 10:49 ` rguenth at gcc dot gnu.org
  2015-05-08 10:50 ` rguenth at gcc dot gnu.org
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-05-08 10:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |6.0


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-05-08 10:49 ` rguenth at gcc dot gnu.org
@ 2015-05-08 10:50 ` rguenth at gcc dot gnu.org
  2015-05-09 12:20 ` kugan at gcc dot gnu.org
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-05-08 10:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
You can always make it a -pedantic error only...


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-05-08 10:50 ` rguenth at gcc dot gnu.org
@ 2015-05-09 12:20 ` kugan at gcc dot gnu.org
  2015-05-11 13:09 ` vp at gcc dot gnu.org
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: kugan at gcc dot gnu.org @ 2015-05-09 12:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

kugan at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kugan at gcc dot gnu.org

--- Comment #5 from kugan at gcc dot gnu.org ---
I ran into this today when I created a cross compiler for aarch64-linux-gnu. It
also happens with arm. As Richard Biener suggested, -pedantic helps. How about
this:

diff --git a/gcc/c/c-typeck.c b/gcc/c/c-typeck.c
index 3fcb7c2..d5d82fd 100644
--- a/gcc/c/c-typeck.c
+++ b/gcc/c/c-typeck.c
@@ -10702,7 +10702,7 @@ build_binary_op (location_t location, enum tree_code
code,
            {
              /* Don't reject a left shift of a negative value in a context
                 where a constant expression is needed in C90.  */
-             if (flag_isoc99)
+             if (flag_isoc99 && pedantic)
                int_const = false;
              if (c_inhibit_evaluation_warnings == 0)
                warning_at (location, OPT_Wshift_negative_value,


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-05-09 12:20 ` kugan at gcc dot gnu.org
@ 2015-05-11 13:09 ` vp at gcc dot gnu.org
  2015-05-12  9:47 ` rohitarulraj at gmail dot com
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: vp at gcc dot gnu.org @ 2015-05-11 13:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

Vidya Praveen <vp at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vp at gcc dot gnu.org

--- Comment #6 from Vidya Praveen <vp at gcc dot gnu.org> ---
glibc build fails as well (i observed for arm and aarch64).


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-05-11 13:09 ` vp at gcc dot gnu.org
@ 2015-05-12  9:47 ` rohitarulraj at gmail dot com
  2015-05-12 10:22 ` clyon at gcc dot gnu.org
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: rohitarulraj at gmail dot com @ 2015-05-12  9:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

Rohit <rohitarulraj at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rohitarulraj at gmail dot com

--- Comment #7 from Rohit <rohitarulraj at gmail dot com> ---
glibc build for PowerPC fails too.


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2015-05-12  9:47 ` rohitarulraj at gmail dot com
@ 2015-05-12 10:22 ` clyon at gcc dot gnu.org
  2015-05-12 15:56 ` mpolacek at gcc dot gnu.org
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: clyon at gcc dot gnu.org @ 2015-05-12 10:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

--- Comment #8 from clyon at gcc dot gnu.org ---
Can we consider moving this to -pedantic as suggested by Richard in comment #4?

Full compiler builds are broken because of this.

Thanks


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2015-05-12 10:22 ` clyon at gcc dot gnu.org
@ 2015-05-12 15:56 ` mpolacek at gcc dot gnu.org
  2015-05-12 16:07 ` manu at gcc dot gnu.org
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-05-12 15:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-05-12
           Assignee|unassigned at gcc dot gnu.org      |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #10 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Working on this, but it isn't a simple matter of adding "pedantic".


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2015-05-12 15:56 ` mpolacek at gcc dot gnu.org
@ 2015-05-12 16:07 ` manu at gcc dot gnu.org
  2015-05-12 16:24 ` mpolacek at gcc dot gnu.org
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: manu at gcc dot gnu.org @ 2015-05-12 16:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #11 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #10)
> Working on this, but it isn't a simple matter of adding "pedantic".

Joseph, would testing global_dc->pedantic_errors be an acceptable work-around
(with a big ??? note) while a better solution is found?
>From gcc-bugs-return-486150-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue May 12 16:18:52 2015
Return-Path: <gcc-bugs-return-486150-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 41569 invoked by alias); 12 May 2015 16:18:52 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 41490 invoked by uid 55); 12 May 2015 16:18:48 -0000
From: "joseph at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
Date: Tue, 12 May 2015 16:18:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: joseph at codesourcery dot com
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66066-4-TwlsiCeBn0@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66066-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66066-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg00990.txt.bz2
Content-length: 678

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf066

--- Comment #12 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Tue, 12 May 2015, manu at gcc dot gnu.org wrote:

> > Working on this, but it isn't a simple matter of adding "pedantic".
>
> Joseph, would testing global_dc->pedantic_errors be an acceptable work-around
> (with a big ??? note) while a better solution is found?

If you want a workaround, a test for "pedantic" would be the natural
workaround, but I think the proper fix is folding as I described at
<https://gcc.gnu.org/ml/gcc-patches/2015-05/msg01015.html> to allow these
cases to reach the existing pedwarn-if-pedantic logic.


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2015-05-12 16:07 ` manu at gcc dot gnu.org
@ 2015-05-12 16:24 ` mpolacek at gcc dot gnu.org
  2015-05-12 16:30 ` manu at gcc dot gnu.org
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-05-12 16:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

--- Comment #13 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
I expect to have a proper fix (additional folding in c_fully_fold_internal)
today or tomorrow, depends on how many issues I hit along the way (see e.g.
PR66127).  The tzdata issue seems to be being worked on, so I think the
"pedantic" stopgap isn't needed right now.


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2015-05-12 16:24 ` mpolacek at gcc dot gnu.org
@ 2015-05-12 16:30 ` manu at gcc dot gnu.org
  2015-05-12 19:09 ` mpolacek at gcc dot gnu.org
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: manu at gcc dot gnu.org @ 2015-05-12 16:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

--- Comment #14 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Marek Polacek from comment #13)
> I expect to have a proper fix (additional folding in c_fully_fold_internal)
> today or tomorrow, depends on how many issues I hit along the way (see e.g.
> PR66127).  The tzdata issue seems to be being worked on, so I think the
> "pedantic" stopgap isn't needed right now.

OK, great. That seems a step in the right direction. Thanks for fixing this!
>From gcc-bugs-return-486158-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue May 12 16:30:24 2015
Return-Path: <gcc-bugs-return-486158-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 18487 invoked by alias); 12 May 2015 16:30:24 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 18374 invoked by uid 48); 12 May 2015 16:30:20 -0000
From: "gerhard.steinmetz.fortran@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/66128] ICE for some intrinsics with zero sized array parameter
Date: Tue, 12 May 2015 16:30:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 5.1.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: gerhard.steinmetz.fortran@t-online.de
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-66128-4-JJRZ0XTD0G@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66128-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66128-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg00998.txt.bz2
Content-length: 968

https://gcc.gnu.org/bugzilla/show_bug.cgi?idf128

--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Some more examples with other error messages.

This one ...
   program p
      integer, parameter :: z(0) = 0
      print *, count(z > 0)
   end

yields :
internal compiler error: in gfc_conv_intrinsic_count, at
fortran/trans-intrinsic.c:3233

This one ...
   program p
      integer, parameter :: z(0) = 0
      print *, iall(z, z > 0)
      print *, iany(z, z > 0)
      print *, iparity(z, z > 0)
      print *, parity(z > 0)
      print *, product(z, z > 0)
      print *, sum(z, z > 0)
   end

yields :
internal compiler error: in gfc_conv_intrinsic_arith, at
fortran/trans-intrinsic.c:3357

This one ...
   program p
      integer, parameter :: z(0) = 0
      print *, minval(z, z > 0)
      print *, maxval(z, z > 0)
   end

yields :
internal compiler error: in gfc_conv_intrinsic_minmaxval, at
fortran/trans-intrinsic.c:4253


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2015-05-12 16:30 ` manu at gcc dot gnu.org
@ 2015-05-12 19:09 ` mpolacek at gcc dot gnu.org
  2015-05-13 15:22 ` sje at gcc dot gnu.org
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-05-12 19:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

--- Comment #15 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Created attachment 35534
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35534&action=edit
gcc6-pr66066

Untested patch without a test


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2015-05-12 19:09 ` mpolacek at gcc dot gnu.org
@ 2015-05-13 15:22 ` sje at gcc dot gnu.org
  2015-05-13 15:27 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: sje at gcc dot gnu.org @ 2015-05-13 15:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

--- Comment #16 from Steve Ellcey <sje at gcc dot gnu.org> ---
I tried Marek's patch and it fixed the build issue with glibc.  I did get a few
new errors that I think are caused by this change:

FAIL: g++.dg/warn/overflow-warn-1.C  -std=gnu++98 (test for excess errors)
FAIL: g++.dg/warn/overflow-warn-1.C  -std=gnu++11 (test for excess errors)
FAIL: g++.dg/warn/overflow-warn-1.C  -std=gnu++14 (test for excess errors)
FAIL: g++.dg/warn/overflow-warn-3.C  -std=gnu++98 (test for excess errors)
FAIL: g++.dg/warn/overflow-warn-3.C  -std=gnu++11 (test for excess errors)
FAIL: g++.dg/warn/overflow-warn-3.C  -std=gnu++14 (test for excess errors)
FAIL: g++.dg/warn/overflow-warn-4.C  -std=gnu++98 (test for excess errors)
FAIL: g++.dg/warn/overflow-warn-4.C  -std=gnu++11 (test for excess errors)
FAIL: g++.dg/warn/overflow-warn-4.C  -std=gnu++14 (test for excess errors)


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2015-05-13 15:22 ` sje at gcc dot gnu.org
@ 2015-05-13 15:27 ` mpolacek at gcc dot gnu.org
  2015-05-14 11:43 ` mpolacek at gcc dot gnu.org
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-05-13 15:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

--- Comment #17 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Yeah, fixing PR66127 in some way is a prerequisite for the patch to go in. 
PR66127 is being discussed in the ML, where I've posted an updated version of
the patch for this PR.


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2015-05-13 15:27 ` mpolacek at gcc dot gnu.org
@ 2015-05-14 11:43 ` mpolacek at gcc dot gnu.org
  2015-05-14 11:44 ` mpolacek at gcc dot gnu.org
  2015-05-14 11:44 ` mpolacek at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-05-14 11:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

--- Comment #18 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Thu May 14 11:42:53 2015
New Revision: 223193

URL: https://gcc.gnu.org/viewcvs?rev=223193&root=gcc&view=rev
Log:
        PR c/66066
        PR c/66127
        * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
        (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
        C_MAYBE_CONST_EXPR_INT_OPERANDS set.  Add FOR_INT_CONST argument and
        use it.  If FOR_INT_CONST, require that all evaluated operands be
        INTEGER_CSTs.

        * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
        rather than with 0.

        * gcc.dg/pr14649-1.c: Add -Wpedantic.
        * gcc.dg/pr19984.c: Likewise.
        * gcc.dg/pr66066-1.c: New test.
        * gcc.dg/pr66066-2.c: New test.
        * gcc.dg/pr66066-3.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr66066-1.c
    trunk/gcc/testsuite/gcc.dg/pr66066-2.c
    trunk/gcc/testsuite/gcc.dg/pr66066-3.c
Modified:
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/c/ChangeLog
    trunk/gcc/c/c-typeck.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/pr14649-1.c
    trunk/gcc/testsuite/gcc.dg/pr19984.c


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2015-05-14 11:44 ` mpolacek at gcc dot gnu.org
@ 2015-05-14 11:44 ` mpolacek at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-05-14 11:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066
Bug 66066 depends on bug 66127, which changed state.

Bug 66127 Summary: Division by zero gets folded away
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66127

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


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

* [Bug c/66066] [6 Regression] r222889 causes bogus error: initializer element is not constant
  2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2015-05-14 11:43 ` mpolacek at gcc dot gnu.org
@ 2015-05-14 11:44 ` mpolacek at gcc dot gnu.org
  2015-05-14 11:44 ` mpolacek at gcc dot gnu.org
  17 siblings, 0 replies; 19+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-05-14 11:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66066

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

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

--- Comment #19 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Ought to be fixed.


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

end of thread, other threads:[~2015-05-14 11:44 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-08  6:04 [Bug c/66066] New: [6 Regression] r222889 causes bogus error: initializer element is not constant trippels at gcc dot gnu.org
2015-05-08  7:37 ` [Bug c/66066] " mpolacek at gcc dot gnu.org
2015-05-08  8:11 ` mpolacek at gcc dot gnu.org
2015-05-08 10:49 ` rguenth at gcc dot gnu.org
2015-05-08 10:50 ` rguenth at gcc dot gnu.org
2015-05-09 12:20 ` kugan at gcc dot gnu.org
2015-05-11 13:09 ` vp at gcc dot gnu.org
2015-05-12  9:47 ` rohitarulraj at gmail dot com
2015-05-12 10:22 ` clyon at gcc dot gnu.org
2015-05-12 15:56 ` mpolacek at gcc dot gnu.org
2015-05-12 16:07 ` manu at gcc dot gnu.org
2015-05-12 16:24 ` mpolacek at gcc dot gnu.org
2015-05-12 16:30 ` manu at gcc dot gnu.org
2015-05-12 19:09 ` mpolacek at gcc dot gnu.org
2015-05-13 15:22 ` sje at gcc dot gnu.org
2015-05-13 15:27 ` mpolacek at gcc dot gnu.org
2015-05-14 11:43 ` mpolacek at gcc dot gnu.org
2015-05-14 11:44 ` mpolacek at gcc dot gnu.org
2015-05-14 11:44 ` mpolacek 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).