public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand
@ 2014-03-25 15:51 doko at gcc dot gnu.org
  2014-03-25 16:03 ` [Bug target/60655] " ramana at gcc dot gnu.org
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: doko at gcc dot gnu.org @ 2014-03-25 15:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60655
           Summary: [4.9 Regression] ICE: output_operand: invalid
                    expression as operand
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org

Created attachment 32450
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32450&action=edit
preprocessed source

seen with trunk r208764, omitting -fdata-sections works around it

$ gcc -c -g -O2 -fdata-sections mpilib.i
mpilib.c:1938:1: internal compiler error: output_operand: invalid expression as
operand
Please submit a full bug report,
with preprocessed source if appropriate.

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.9-20140322-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap
--disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf
--with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions
--with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb
--disable-werror --enable-multilib --enable-checking=release
--build=arm-linux-gnueabihf --host=arm-linux-gnueabihf
--target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.9.0 20140322 (experimental) [trunk revision 208764] (Ubuntu
4.9-20140322-1ubuntu1)


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

* [Bug target/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
  2014-03-25 16:03 ` [Bug target/60655] " ramana at gcc dot gnu.org
@ 2014-03-25 16:03 ` ramana at gcc dot gnu.org
  2014-03-25 16:18 ` ramana at gcc dot gnu.org
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-03-25 16:03 UTC (permalink / raw)
  To: gcc-bugs

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

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-03-25
   Target Milestone|---                         |4.9.0
     Ever confirmed|0                           |1


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

* [Bug target/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
@ 2014-03-25 16:03 ` ramana at gcc dot gnu.org
  2014-03-25 16:03 ` ramana at gcc dot gnu.org
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-03-25 16:03 UTC (permalink / raw)
  To: gcc-bugs

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

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

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

--- Comment #1 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Created attachment 32451
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32451&action=edit
reduced testcase

hmm -g -fdata-sections -mthumb is enough to provoke this at v7-a level of the
architecture with either vfpv3-d16 or neon. -g and -fdata-sections appear to be
the key here.


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

* [Bug target/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
  2014-03-25 16:03 ` [Bug target/60655] " ramana at gcc dot gnu.org
  2014-03-25 16:03 ` ramana at gcc dot gnu.org
@ 2014-03-25 16:18 ` ramana at gcc dot gnu.org
  2014-03-25 16:21 ` [Bug debug/60655] " ramana at gcc dot gnu.org
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-03-25 16:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
The expression being put out is :

(const:SI (not:SI (symbol_ref:SI ("*.LANCHOR0") [flags 0x182])))


#0  0x0000003105033410 in exit () from /lib64/libc.so.6
#1  0x00000000011c56b8 in diagnostic_action_after_output (context=0x1a6d080,
diagnostic=0x7fffffffc110) at /work/wa1/src/gcc/gcc/diagnostic.c:487
#2  0x00000000011c6615 in diagnostic_report_diagnostic (context=0x1a6d080,
diagnostic=0x7fffffffc110) at /work/wa1/src/gcc/gcc/diagnostic.c:804
#3  0x00000000011c75a1 in internal_error (gmsgid=0x12c6ad6 "%s") at
/work/wa1/src/gcc/gcc/diagnostic.c:1136
#4  0x00000000007f2342 in output_operand_lossage (cmsgid=0x12c6bb6 "invalid
expression as operand") at /work/wa1/src/gcc/gcc/final.c:3368
#5  0x00000000007f3656 in output_addr_const (file=0x1a73970, x=0x2aaaaae0e290)
at /work/wa1/src/gcc/gcc/final.c:3962
#6  0x00000000007f32e9 in output_addr_const (file=0x1a73970, x=0x2aaaaae0e2b0)
at /work/wa1/src/gcc/gcc/final.c:3884
#7  0x0000000000750035 in dw2_assemble_integer (size=4, x=0x2aaaaae0e2b0) at
/work/wa1/src/gcc/gcc/dwarf2asm.c:53
#8  0x00000000007507fa in dw2_asm_output_addr_rtx (size=4, addr=0x2aaaaae0e2b0,
comment=0x0) at /work/wa1/src/gcc/gcc/dwarf2asm.c:279
#9  0x000000000075d86c in output_loc_operands (loc=0x2aaaaae2d1e0,
for_eh_or_skip=-1) at /work/wa1/src/gcc/gcc/dwarf2out.c:1954
#10 0x000000000075dea6 in output_loc_sequence (loc=0x2aaaaae2d1e0,
for_eh_or_skip=-1) at /work/wa1/src/gcc/gcc/dwarf2out.c:2127
#11 0x000000000076782a in output_loc_list (list_head=0x2aaaaae25e40) at
/work/wa1/src/gcc/gcc/dwarf2out.c:8414
#12 0x0000000000765d9f in output_location_lists (die=0x2aaaaae1aeb0) at
/work/wa1/src/gcc/gcc/dwarf2out.c:7462
#13 0x0000000000765deb in output_location_lists (die=0x2aaaaae1ae60) at
/work/wa1/src/gcc/gcc/dwarf2out.c:7464
#14 0x0000000000765deb in output_location_lists (die=0x2aaaaae1a5f0) at
/work/wa1/src/gcc/gcc/dwarf2out.c:7464
#15 0x0000000000765deb in output_location_lists (die=0x2aaaaab219b0) at
/work/wa1/src/gcc/gcc/dwarf2out.c:7464
#16 0x0000000000790569 in dwarf2out_finish (filename=0x7fffffffd0d3
"/home/ramrad01/reduced.c") at /work/wa1/src/gcc/gcc/dwarf2out.c:24304
#17 0x0000000000b1b63b in compile_file () at /work/wa1/src/gcc/gcc/toplev.c:599
#18 0x0000000000b1d712 in do_compile () at /work/wa1/src/gcc/gcc/toplev.c:1914
#19 0x0000000000b1d87d in toplev_main (argc=9, argv=0x7fffffffcc38) at
/work/wa1/src/gcc/gcc/toplev.c:1990
#20 0x00000000011b24e4 in main (argc=9, argv=0x7fffffffcc38) at
/work/wa1/src/gcc/gcc/main.c:36


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-03-25 16:18 ` ramana at gcc dot gnu.org
@ 2014-03-25 16:21 ` ramana at gcc dot gnu.org
  2014-03-25 16:23 ` ramana at gcc dot gnu.org
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-03-25 16:21 UTC (permalink / raw)
  To: gcc-bugs

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

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |debug

--- Comment #3 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
(note 205 204 206 (var_location r2 (plus:SI (plus:SI (reg:SI 3 r3 [orig:192
ivtmp.37 ] [192])
        (symbol_ref:SI ("*.LANCHOR1") [flags 0x182]))
    (const:SI (not:SI (symbol_ref:SI ("*.LANCHOR0") [flags 0x182])))))
NOTE_INSN_VAR_LOCATION)

Comes from vartracking.

Ramana


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-03-25 16:21 ` [Bug debug/60655] " ramana at gcc dot gnu.org
@ 2014-03-25 16:23 ` ramana at gcc dot gnu.org
  2014-03-26  9:46 ` jakub at gcc dot gnu.org
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-03-25 16:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Command lines I was using to reproduce this with a cross compiler. 


 ./cc1 -g -mthumb -fdata-sections -mfpu=vfpv3-d16 -mfloat-abi=hard -O2
-march=armv7-a


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-03-25 16:23 ` ramana at gcc dot gnu.org
@ 2014-03-26  9:46 ` jakub at gcc dot gnu.org
  2014-03-26 10:04 ` ramrad01 at arm dot com
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-26  9:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
As discussed yesterday with Ramana on IRC, my suggested fix for this for 4.9 is
something like:
--- gcc/dwarf2out.c    2014-03-03 08:24:14.841895755 +0100
+++ gcc/dwarf2out.c    2014-03-26 10:42:32.027508796 +0100
@@ -11326,7 +11326,12 @@ const_ok_for_output_1 (rtx *rtlp, void *
     }

   if (GET_CODE (rtl) != SYMBOL_REF)
-    return 0;
+    {
+      /* NOT is not handled by output_addr_const.  */
+      if (GET_CODE (rtl) == NOT)
+    return 1;
+      return 0;
+    }

   if (CONSTANT_POOL_ADDRESS_P (rtl))
     {

and for 5.0 we want to gather some statistics what we actually accept as CONST
operands in const_ok_for_output and then successfully emit it into debug info
and assemble that, and based on that adjust const_ok_for_output or it's
callers, so that for CONST expressions that have no chance of being assembled
we actually ignore the CONST around the expression and try to emit it as the
individual expressions.  So, say instead of trying to emit DW_OP_addr
(-1-symbol) in this case which won't assemble we emit it as DW_OP_const1s -1
DW_OP_addr (symbol) DW_OP_minus.


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-03-26  9:46 ` jakub at gcc dot gnu.org
@ 2014-03-26 10:04 ` ramrad01 at arm dot com
  2014-03-26 17:29 ` ramana at gcc dot gnu.org
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ramrad01 at arm dot com @ 2014-03-26 10:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from ramrad01 at arm dot com ---
On 03/26/14 09:46, jakub at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60655
>
> Jakub Jelinek <jakub at gcc dot gnu.org> changed:
>
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |jakub at gcc dot gnu.org
>
> --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> As discussed yesterday with Ramana on IRC, my suggested fix for this for 4.9 is
> something like:
> --- gcc/dwarf2out.c    2014-03-03 08:24:14.841895755 +0100
> +++ gcc/dwarf2out.c    2014-03-26 10:42:32.027508796 +0100
> @@ -11326,7 +11326,12 @@ const_ok_for_output_1 (rtx *rtlp, void *
>       }
>
>     if (GET_CODE (rtl) != SYMBOL_REF)
> -    return 0;
> +    {
> +      /* NOT is not handled by output_addr_const.  */
> +      if (GET_CODE (rtl) == NOT)
> +    return 1;
> +      return 0;
> +    }


I have a very similar patch under testing only with a comment linking 
this to the bug report and bootstrapping and regression testing on 
aarch64, armhf and x86_64.

>
>     if (CONSTANT_POOL_ADDRESS_P (rtl))
>       {
>
> and for 5.0 we want to gather some statistics what we actually accept as CONST
> operands in const_ok_for_output and then successfully emit it into debug info
> and assemble that, and based on that adjust const_ok_for_output or it's
> callers, so that for CONST expressions that have no chance of being assembled
> we actually ignore the CONST around the expression and try to emit it as the
> individual expressions.  So, say instead of trying to emit DW_OP_addr
> (-1-symbol) in this case which won't assemble we emit it as DW_OP_const1s -1
> DW_OP_addr (symbol) DW_OP_minus.

Agreed.


regards
Ramana



>


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2014-03-26 10:04 ` ramrad01 at arm dot com
@ 2014-03-26 17:29 ` ramana at gcc dot gnu.org
  2014-03-26 17:48 ` ramana at gcc dot gnu.org
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-03-26 17:29 UTC (permalink / raw)
  To: gcc-bugs

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

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |ramana at gcc dot gnu.org


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2014-03-26 17:29 ` ramana at gcc dot gnu.org
@ 2014-03-26 17:48 ` ramana at gcc dot gnu.org
  2014-04-04 16:10 ` ramana at gcc dot gnu.org
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-03-26 17:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #5)
> As discussed yesterday with Ramana on IRC, my suggested fix for this for 4.9
> is something like:
> --- gcc/dwarf2out.c	2014-03-03 08:24:14.841895755 +0100
> +++ gcc/dwarf2out.c	2014-03-26 10:42:32.027508796 +0100
> @@ -11326,7 +11326,12 @@ const_ok_for_output_1 (rtx *rtlp, void *
>      }
>  
>    if (GET_CODE (rtl) != SYMBOL_REF)
> -    return 0;
> +    {
> +      /* NOT is not handled by output_addr_const.  */
> +      if (GET_CODE (rtl) == NOT)
> +	return 1;
> +      return 0;
> +    }
>  

In addition looks like we need to handle 

(minus (const_int) (sym_ref))  because with the reduced testcase with -g and
removing the -fdata-sections I get an error with 

const ( minus (323) (sym_ref)) and gas won't grok that because there is no
relocation that will deal with this. 


(note 220 219 221 5 (var_location r2 (plus:SI (plus:SI (reg:SI 3 r3 [orig:192
ivtmp.37 ] [192])
        (symbol_ref:SI ("*.LANCHOR0") [flags 0x182]))
    (const:SI (minus:SI (const_int 323 [0x143])
            (symbol_ref:SI ("*.LANCHOR0") [flags 0x182])))))
NOTE_INSN_VAR_LOCATION)

Uggh this is proving to be more ugly.
>From gcc-bugs-return-447574-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Mar 26 17:57:18 2014
Return-Path: <gcc-bugs-return-447574-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 3683 invoked by alias); 26 Mar 2014 17:57:18 -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 3625 invoked by uid 55); 26 Mar 2014 17:57:12 -0000
From: "dave.anglin at bell dot net" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/60128] [4.8/4.9 Regression] Wrong ouput using en edit descriptor
Date: Wed, 26 Mar 2014 17:57: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: 4.8.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: dave.anglin at bell dot net
X-Bugzilla-Status: REOPENED
X-Bugzilla-Priority: P4
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.8.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-60128-4-8P2WmFrNWS@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60128-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60128-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: 2014-03/txt/msg02443.txt.bz2
Content-length: 475

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`128

--- Comment #47 from dave.anglin at bell dot net ---
On 3/26/2014 12:34 PM, dominiq at lps dot ens.fr wrote:
> AFAICT on hppa*-*-hpux11* the E format does not round to nearest for tie. What
> is the output of the following test
>
> #include "stdio.h"
> int main() {
>      printf("%.1e %.1e\n", 9950.0, 9750.0);
>      return 0;
> }
>
> ? On x86_64-apple-darwin13, I get '1.0e+04 9.8e+03'.
You are correct:
9.9e+03 9.7e+03


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2014-03-26 17:48 ` ramana at gcc dot gnu.org
@ 2014-04-04 16:10 ` ramana at gcc dot gnu.org
  2014-04-04 16:13 ` ramana at gcc dot gnu.org
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-04-04 16:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Author: ramana
Date: Fri Apr  4 16:10:07 2014
New Revision: 209121

URL: http://gcc.gnu.org/viewcvs?rev=209121&root=gcc&view=rev
Log:
Fix PR debug/60655 - part 1



This is a partial fix for PR60655 where dwarf2out.c rejects NOT of a
value in const_ok_for_output_1. There is still a problem with the
testcase on armhf where we get operations of the form, const (minus
(const_int) (symref)) without the -fdata-sections option which is just
weird. I'm not yet sure where this is produced from and will not have
the time to dig further today.


As Jakub said on IRC, const_ok_for_output_1 is called only with
partial rtx's and therefore disabling minus (const_int) (symref) might
not be the best thing to do especially if this were part of plus
(symref) (minus (const int) (symref)) and both symrefs were in the
same section.


Bootstrapped and regtested on armhf

Bootstrap and regression test running on x86_64.

Ok to commit ?

regards
Ramana

gcc/

<DATE>   Jakub Jelinek <jakub@redhat.com>
         Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

    * dwarf2out.c (const_ok_for_output_1): Reject expressions
    containing a NOT.

gcc/testsuite

<DATE>  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

    * gcc.c-torture/compile/pr60655-1.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2014-04-04 16:10 ` ramana at gcc dot gnu.org
@ 2014-04-04 16:13 ` ramana at gcc dot gnu.org
  2014-04-08 11:30 ` ramana at gcc dot gnu.org
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-04-04 16:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Partially fixed on trunk - need to handle the failure without -fdata-sections
and -g


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2014-04-04 16:13 ` ramana at gcc dot gnu.org
@ 2014-04-08 11:30 ` ramana at gcc dot gnu.org
  2014-04-08 11:46 ` ramana at gcc dot gnu.org
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-04-08 11:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
I haven't had enough time to work on this one but in the interest of getting
this sorted for 4.9, I'm handling this as suggested by Jakub in the backend
under targetm.const_not_ok_for_debug_p and disallowing anything that is minus
(..) (sym_ref) except for minus (sym_ref) (sym_ref) where the
DECL_SECTION_NAMEs are identical including null.

Hopefully that will sort out the problem for 4.9 but we still need this
investigated properly for later.

ramana


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2014-04-08 11:30 ` ramana at gcc dot gnu.org
@ 2014-04-08 11:46 ` ramana at gcc dot gnu.org
  2014-04-08 12:42 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-04-08 11:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Created attachment 32564
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32564&action=edit
patch...

Fix so far tested just on the reduced and the full testcase. No issues. Now
bootstrapping and regression testing on armhf.

regards
Ramana


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2014-04-08 11:46 ` ramana at gcc dot gnu.org
@ 2014-04-08 12:42 ` jakub at gcc dot gnu.org
  2014-04-09 12:20 ` ramana at gcc dot gnu.org
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-04-08 12:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 32565
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32565&action=edit
gcc49-pr60655.patch

Alternate fix, the issue on the non-fdata-sections testcase is that we have
(note 226 225 227 (var_location rx (plus:SI (plus:SI (reg:SI 3 r3 [orig:192
ivtmp.37 ] [192])
        (symbol_ref:SI ("*.LANCHOR0") [flags 0x182]))
    (const:SI (minus:SI (const_int 323 [0x143])
            (symbol_ref:SI ("*.LANCHOR0") [flags 0x182])))))
NOTE_INSN_VAR_LOCATION)

which hasn't been simplified into %r3+323.  I think this patch is the right
thing to do, but it is probably too risky for 4.9 now, too many targets do too
weird things, especially for -fpic.  Perhaps if we had a flag (global for 4.9)
we are in var-tracking pass (guess current_pass && strcmp (current_pass->name,
"vartrack") == 0 would be way too ugly), it might be safe to do that only for
var-tracking and for 5.0 enable it unconditionally.


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2014-04-08 12:42 ` jakub at gcc dot gnu.org
@ 2014-04-09 12:20 ` ramana at gcc dot gnu.org
  2014-04-09 12:47 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-04-09 12:20 UTC (permalink / raw)
  To: gcc-bugs

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

Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #32564|0                           |1
        is obsolete|                            |

--- Comment #14 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Created attachment 32571
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32571&action=edit
Reworked patch

Reworked patch currently testing.


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2014-04-09 12:20 ` ramana at gcc dot gnu.org
@ 2014-04-09 12:47 ` jakub at gcc dot gnu.org
  2014-04-10  8:14 ` ramana at gcc dot gnu.org
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-04-09 12:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Looks good to me, thanks.


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2014-04-09 12:47 ` jakub at gcc dot gnu.org
@ 2014-04-10  8:14 ` ramana at gcc dot gnu.org
  2014-04-10  8:29 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-04-10  8:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
Author: ramana
Date: Thu Apr 10 08:13:30 2014
New Revision: 209269

URL: http://gcc.gnu.org/viewcvs?rev=209269&root=gcc&view=rev
Log:
Fix PR debug/60655 part 2.

2014-04-10  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

        PR debug/60655
        * config/arm/arm.c (TARGET_CONST_NOT_OK_FOR_DEBUG_P): Define
        (arm_const_not_ok_for_debug_p): Reject MINUS with SYM_REF's
        ameliorating the cases where it can be.

2014-04-10  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

        PR debug/60655
        * gcc.c-torture/compile/pr60655-2.c: Copy from pr60655-1.c without
        -fdata-sections.


Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr60655-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/arm/arm.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2014-04-10  8:14 ` ramana at gcc dot gnu.org
@ 2014-04-10  8:29 ` jakub at gcc dot gnu.org
  2014-09-04 12:19 ` amodra at gcc dot gnu.org
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-04-10  8:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  2014-04-10  8:29 ` jakub at gcc dot gnu.org
@ 2014-09-04 12:19 ` amodra at gcc dot gnu.org
  2014-09-10  5:02 ` amodra at gcc dot gnu.org
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amodra at gcc dot gnu.org @ 2014-09-04 12:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Alan Modra <amodra at gcc dot gnu.org> ---
Author: amodra
Date: Thu Sep  4 12:18:25 2014
New Revision: 214899

URL: https://gcc.gnu.org/viewcvs?rev=214899&root=gcc&view=rev
Log:
    PR debug/60655
    * dwarf2out.c (mem_loc_descriptor <PLUS>): Return NULL if addend
    can't be output.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/dwarf2out.c


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (18 preceding siblings ...)
  2014-09-04 12:19 ` amodra at gcc dot gnu.org
@ 2014-09-10  5:02 ` amodra at gcc dot gnu.org
  2014-09-10  5:03 ` amodra at gcc dot gnu.org
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: amodra at gcc dot gnu.org @ 2014-09-10  5:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Alan Modra <amodra at gcc dot gnu.org> ---
Author: amodra
Date: Wed Sep 10 05:02:02 2014
New Revision: 215102

URL: https://gcc.gnu.org/viewcvs?rev=215102&root=gcc&view=rev
Log:
    PR debug/60655
    * dwarf2out.c (mem_loc_descriptor <PLUS>): Return NULL if addend
    can't be output.


Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
    branches/gcc-4_9-branch/gcc/dwarf2out.c


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (19 preceding siblings ...)
  2014-09-10  5:02 ` amodra at gcc dot gnu.org
@ 2014-09-10  5:03 ` amodra at gcc dot gnu.org
  2014-09-29 10:07 ` jtaylor.debian at googlemail dot com
  2014-10-20 12:11 ` amodra at gcc dot gnu.org
  22 siblings, 0 replies; 24+ messages in thread
From: amodra at gcc dot gnu.org @ 2014-09-10  5:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from Alan Modra <amodra at gcc dot gnu.org> ---
Author: amodra
Date: Wed Sep 10 05:02:28 2014
New Revision: 215103

URL: https://gcc.gnu.org/viewcvs?rev=215103&root=gcc&view=rev
Log:
    PR debug/60655
    * dwarf2out.c (mem_loc_descriptor <PLUS>): Return NULL if addend
    can't be output.


Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/dwarf2out.c


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (20 preceding siblings ...)
  2014-09-10  5:03 ` amodra at gcc dot gnu.org
@ 2014-09-29 10:07 ` jtaylor.debian at googlemail dot com
  2014-10-20 12:11 ` amodra at gcc dot gnu.org
  22 siblings, 0 replies; 24+ messages in thread
From: jtaylor.debian at googlemail dot com @ 2014-09-29 10:07 UTC (permalink / raw)
  To: gcc-bugs

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

Julian Taylor <jtaylor.debian at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jtaylor.debian at googlemail dot c
                   |                            |om

--- Comment #21 from Julian Taylor <jtaylor.debian at googlemail dot com> ---
this fix causes another ICE, see PR63342
but it doesn't seem to affect the current 4.9 and 4.8 branches, so there is
probably some other interaction with a 5.0 change causing it.


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

* [Bug debug/60655] [4.9 Regression] ICE: output_operand: invalid expression as operand
  2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
                   ` (21 preceding siblings ...)
  2014-09-29 10:07 ` jtaylor.debian at googlemail dot com
@ 2014-10-20 12:11 ` amodra at gcc dot gnu.org
  22 siblings, 0 replies; 24+ messages in thread
From: amodra at gcc dot gnu.org @ 2014-10-20 12:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from Alan Modra <amodra at gcc dot gnu.org> ---
Author: amodra
Date: Mon Oct 20 11:54:22 2014
New Revision: 216462

URL: https://gcc.gnu.org/viewcvs?rev=216462&root=gcc&view=rev
Log:
    PR debug/60655
    * simplify-rtx.c (simplify_plus_minus): Delete unused "input_ops".
    Increase "ops" array size.  Correct array size tests.  Init
    n_constants in loop.  Break out of innermost loop when finding
    a trivial CONST expression.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/simplify-rtx.c


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

end of thread, other threads:[~2014-10-20 11:55 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-25 15:51 [Bug target/60655] New: [4.9 Regression] ICE: output_operand: invalid expression as operand doko at gcc dot gnu.org
2014-03-25 16:03 ` [Bug target/60655] " ramana at gcc dot gnu.org
2014-03-25 16:03 ` ramana at gcc dot gnu.org
2014-03-25 16:18 ` ramana at gcc dot gnu.org
2014-03-25 16:21 ` [Bug debug/60655] " ramana at gcc dot gnu.org
2014-03-25 16:23 ` ramana at gcc dot gnu.org
2014-03-26  9:46 ` jakub at gcc dot gnu.org
2014-03-26 10:04 ` ramrad01 at arm dot com
2014-03-26 17:29 ` ramana at gcc dot gnu.org
2014-03-26 17:48 ` ramana at gcc dot gnu.org
2014-04-04 16:10 ` ramana at gcc dot gnu.org
2014-04-04 16:13 ` ramana at gcc dot gnu.org
2014-04-08 11:30 ` ramana at gcc dot gnu.org
2014-04-08 11:46 ` ramana at gcc dot gnu.org
2014-04-08 12:42 ` jakub at gcc dot gnu.org
2014-04-09 12:20 ` ramana at gcc dot gnu.org
2014-04-09 12:47 ` jakub at gcc dot gnu.org
2014-04-10  8:14 ` ramana at gcc dot gnu.org
2014-04-10  8:29 ` jakub at gcc dot gnu.org
2014-09-04 12:19 ` amodra at gcc dot gnu.org
2014-09-10  5:02 ` amodra at gcc dot gnu.org
2014-09-10  5:03 ` amodra at gcc dot gnu.org
2014-09-29 10:07 ` jtaylor.debian at googlemail dot com
2014-10-20 12:11 ` amodra 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).