public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/66178] New: Another label as values ICE
@ 2015-05-16 18:03 SztfG at yandex dot ru
  2015-05-16 18:20 ` [Bug tree-optimization/66178] " SztfG at yandex dot ru
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: SztfG at yandex dot ru @ 2015-05-16 18:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 66178
           Summary: Another label as values ICE
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: SztfG at yandex dot ru
  Target Milestone: ---

c and c++ compiler crashes. Testcase:

void bar(int);

int test(void) {
    static int test =  ((char *)&&l2-(char *)&&l3)+((char *)&&l1-(char *)&&l2);
l1:
l2:
l3:
    bar(test);
    return 0;
}


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

* [Bug tree-optimization/66178] Another label as values ICE
  2015-05-16 18:03 [Bug tree-optimization/66178] New: Another label as values ICE SztfG at yandex dot ru
@ 2015-05-16 18:20 ` SztfG at yandex dot ru
  2015-05-16 18:39 ` SztfG at yandex dot ru
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: SztfG at yandex dot ru @ 2015-05-16 18:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from SztfG at yandex dot ru ---
better test case

int test(void)
{
    static int a =  ((char *)&&l2-(char *)&&l3)+((char *)&&l1-(char *)&&l2);
l1:
l2:
l3:
    return a;
}


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

* [Bug tree-optimization/66178] Another label as values ICE
  2015-05-16 18:03 [Bug tree-optimization/66178] New: Another label as values ICE SztfG at yandex dot ru
  2015-05-16 18:20 ` [Bug tree-optimization/66178] " SztfG at yandex dot ru
@ 2015-05-16 18:39 ` SztfG at yandex dot ru
  2015-05-18  7:41 ` [Bug middle-end/66178] [4.8/4.9/5/6 Regression] Another label as values ICE in gen_reg_rtx, at emit-rtl.c:1059 rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: SztfG at yandex dot ru @ 2015-05-16 18:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from SztfG at yandex dot ru ---
another testcase:

int test(void)
{
    static int a =  ((char *)&&l1-(char *)&&l2)-1;
l1:
l2:
    return a;
}


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

* [Bug middle-end/66178] [4.8/4.9/5/6 Regression] Another label as values ICE in gen_reg_rtx, at emit-rtl.c:1059
  2015-05-16 18:03 [Bug tree-optimization/66178] New: Another label as values ICE SztfG at yandex dot ru
  2015-05-16 18:20 ` [Bug tree-optimization/66178] " SztfG at yandex dot ru
  2015-05-16 18:39 ` SztfG at yandex dot ru
@ 2015-05-18  7:41 ` rguenth at gcc dot gnu.org
  2015-05-18 20:31 ` miyuki at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-05-18  7:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |4.3.4
            Version|unknown                     |6.0
           Keywords|                            |accepts-invalid
   Last reconfirmed|                            |2015-05-18
          Component|tree-optimization           |middle-end
     Ever confirmed|0                           |1
            Summary|Another label as values ICE |[4.8/4.9/5/6 Regression]
                   |                            |Another label as values ICE
                   |                            |in gen_reg_rtx, at
                   |                            |emit-rtl.c:1059
   Target Milestone|---                         |4.8.5

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.

t.c:10:1: internal compiler error: in gen_reg_rtx, at emit-rtl.c:1059
 }
 ^
0x95343b gen_reg_rtx(machine_mode)
        /space/rguenther/src/svn/trunk2/gcc/emit-rtl.c:1059
0xc8a3da maybe_legitimize_operand
        /space/rguenther/src/svn/trunk2/gcc/optabs.c:8296
0xc8a739 maybe_legitimize_operands(insn_code, unsigned int, unsigned int,
expand_operand*)
        /space/rguenther/src/svn/trunk2/gcc/optabs.c:8369
0xc8a7ca maybe_gen_insn(insn_code, unsigned int, expand_operand*)
        /space/rguenther/src/svn/trunk2/gcc/optabs.c:8387
0xc79a83 expand_binop_directly
        /space/rguenther/src/svn/trunk2/gcc/optabs.c:1496
0xc79d0c expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_def*,
int, optab_methods)
        /space/rguenther/src/svn/trunk2/gcc/optabs.c:1566
...
0x1103344 expand_expr
        /space/rguenther/src/svn/trunk2/gcc/expr.h:254
0x111098b output_constant
        /space/rguenther/src/svn/trunk2/gcc/varasm.c:4793

while for example GCC 4.3 says

> gcc-4.3 -S t.c -O2
t.c: In function ‘test’:
t.c:4: error: initializer element is not computable at load time

and

> gcc-4.8 -S t.c -O2
t.c:10:1: internal compiler error: output_operand: invalid expression as
operand
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.opensuse.org/> for instructions.


I think the initializers are simply not valid.
>From gcc-bugs-return-486507-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon May 18 08:18:45 2015
Return-Path: <gcc-bugs-return-486507-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 62674 invoked by alias); 18 May 2015 08:18:44 -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 62636 invoked by uid 48); 18 May 2015 08:18:40 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/66185] [6 Regression] ICE on valid code at -O3 on x86_64-linux-gnu
Date: Mon, 18 May 2015 08:18:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: tree-optimization
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc target_milestone short_desc everconfirmed
Message-ID: <bug-66185-4-a5jtRIARUx@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-66185-4@http.gcc.gnu.org/bugzilla/>
References: <bug-66185-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/msg01347.txt.bz2
Content-length: 822

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-05-18
                 CC|                            |jakub at gcc dot gnu.org
   Target Milestone|---                         |6.0
            Summary|ICE on valid code at -O3 on |[6 Regression] ICE on valid
                   |x86_64-linux-gnu            |code at -O3 on
                   |                            |x86_64-linux-gnu
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r222514.


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

* [Bug middle-end/66178] [4.8/4.9/5/6 Regression] Another label as values ICE in gen_reg_rtx, at emit-rtl.c:1059
  2015-05-16 18:03 [Bug tree-optimization/66178] New: Another label as values ICE SztfG at yandex dot ru
                   ` (2 preceding siblings ...)
  2015-05-18  7:41 ` [Bug middle-end/66178] [4.8/4.9/5/6 Regression] Another label as values ICE in gen_reg_rtx, at emit-rtl.c:1059 rguenth at gcc dot gnu.org
@ 2015-05-18 20:31 ` miyuki at gcc dot gnu.org
  2015-06-23  8:13 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: miyuki at gcc dot gnu.org @ 2015-05-18 20:31 UTC (permalink / raw)
  To: gcc-bugs

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

Mikhail Maltsev <miyuki at gcc dot gnu.org> changed:

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

--- Comment #4 from Mikhail Maltsev <miyuki at gcc dot gnu.org> ---
But for "static int a =  ((char *)&&l1-(char *)&&l2)+1;" GCC is able to emit a
valid initializer:

.LFE1:
        .size   main, .-main
        .section        .rodata
        .align 4
        .type   a.1833, @object
        .size   a.1833, 4
a.1833:
        .long   .L2-.L3+1

And for last testcase the backtrace looks quite different:

./test.c:13:1: internal compiler error: output_operand: invalid expression as
operand
 }
  ^
0x7ed77f output_operand_lossage(char const*, ...)
        ../../src/gcc/final.c:3446
0x7ee045 output_addr_const(_IO_FILE*, rtx_def*)
        ../../src/gcc/final.c:4035
0x7edfe5 output_addr_const(_IO_FILE*, rtx_def*)
        ../../src/gcc/final.c:3995
0xd808ee assemble_integer_with_op(char const*, rtx_def*)
        ../../src/gcc/varasm.c:2743
0xd80956 default_assemble_integer(rtx_def*, unsigned int, int)
        ../../src/gcc/varasm.c:2759
0xd809d0 assemble_integer(rtx_def*, unsigned int, unsigned int, int)
        ../../src/gcc/varasm.c:2775
0xd86910 output_constant
        ../../src/gcc/varasm.c:4795


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

* [Bug middle-end/66178] [4.8/4.9/5/6 Regression] Another label as values ICE in gen_reg_rtx, at emit-rtl.c:1059
  2015-05-16 18:03 [Bug tree-optimization/66178] New: Another label as values ICE SztfG at yandex dot ru
                   ` (3 preceding siblings ...)
  2015-05-18 20:31 ` miyuki at gcc dot gnu.org
@ 2015-06-23  8:13 ` rguenth at gcc dot gnu.org
  2015-06-26 20:39 ` [Bug middle-end/66178] [4.9/5/6 " jakub at gcc dot gnu.org
  2015-06-30 10:36 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-23  8:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.5                       |4.9.3

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
The gcc-4_8-branch is being closed, re-targeting regressions to 4.9.3.


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

* [Bug middle-end/66178] [4.9/5/6 Regression] Another label as values ICE in gen_reg_rtx, at emit-rtl.c:1059
  2015-05-16 18:03 [Bug tree-optimization/66178] New: Another label as values ICE SztfG at yandex dot ru
                   ` (4 preceding siblings ...)
  2015-06-23  8:13 ` rguenth at gcc dot gnu.org
@ 2015-06-26 20:39 ` jakub at gcc dot gnu.org
  2015-06-30 10:36 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:39 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.3                       |4.9.4


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

* [Bug middle-end/66178] [4.9/5/6 Regression] Another label as values ICE in gen_reg_rtx, at emit-rtl.c:1059
  2015-05-16 18:03 [Bug tree-optimization/66178] New: Another label as values ICE SztfG at yandex dot ru
                   ` (5 preceding siblings ...)
  2015-06-26 20:39 ` [Bug middle-end/66178] [4.9/5/6 " jakub at gcc dot gnu.org
@ 2015-06-30 10:36 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-30 10:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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

end of thread, other threads:[~2015-06-30 10:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-16 18:03 [Bug tree-optimization/66178] New: Another label as values ICE SztfG at yandex dot ru
2015-05-16 18:20 ` [Bug tree-optimization/66178] " SztfG at yandex dot ru
2015-05-16 18:39 ` SztfG at yandex dot ru
2015-05-18  7:41 ` [Bug middle-end/66178] [4.8/4.9/5/6 Regression] Another label as values ICE in gen_reg_rtx, at emit-rtl.c:1059 rguenth at gcc dot gnu.org
2015-05-18 20:31 ` miyuki at gcc dot gnu.org
2015-06-23  8:13 ` rguenth at gcc dot gnu.org
2015-06-26 20:39 ` [Bug middle-end/66178] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-30 10:36 ` 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).