public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/64730] g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL
  2015-01-22 12:56 [Bug ipa/64730] New: g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL ro at gcc dot gnu.org
@ 2015-01-22 12:56 ` ro at gcc dot gnu.org
  2015-01-22 13:07 ` [Bug ipa/64730] [5 Regression] " rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ro at gcc dot gnu.org @ 2015-01-22 12:56 UTC (permalink / raw)
  To: gcc-bugs

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

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |5.0


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

* [Bug ipa/64730] New: g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL
@ 2015-01-22 12:56 ro at gcc dot gnu.org
  2015-01-22 12:56 ` [Bug ipa/64730] " ro at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: ro at gcc dot gnu.org @ 2015-01-22 12:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 64730
           Summary: g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
              Host: *-*-solaris2.10
            Target: *-*-solaris2.10
             Build: *-*-solaris2.10

As reported in

https://gcc.gnu.org/ml/gcc-patches/2015-01/msg01889.html

this change

2015-01-15  Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

       * ipa-inline.c (inline_small_functions): Swap the operands in
       enum.

caused a couple of testsuite failures on Solaris 10:

FAIL: g++.dg/ipa/pr64049-1.C  -std=gnu++11 (internal compiler error)
FAIL: g++.dg/ipa/pr64049-1.C  -std=gnu++11 (test for excess errors)
FAIL: g++.dg/ipa/pr64049-1.C  -std=gnu++14 (internal compiler error)
FAIL: g++.dg/ipa/pr64049-1.C  -std=gnu++14 (test for excess errors)
FAIL: g++.dg/ipa/pr64049-1.C  -std=gnu++98 (internal compiler error)
FAIL: g++.dg/ipa/pr64049-1.C  -std=gnu++98 (test for excess errors)

/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/ipa/pr64049-1.C:34:1: internal
compiler error: Segmentation Fault
0x88b777c crash_signal
        /vol/gcc/src/hg/trunk/local/gcc/toplev.c:381

  cc1plus -fpreprocessed pr64049-1.ii -quiet -O3 -fdump-ipa-inline -o
pr64049-1.s

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
0xfee0645c in strlen () from /lib/libc.so.1
(gdb) where
#0  0xfee0645c in strlen () from /lib/libc.so.1
#1  0xfee61aee in _ndoprnt () from /lib/libc.so.1
#2  0xfee6469e in fprintf () from /lib/libc.so.1
#3  0x08ed5f04 in inline_small_functions ()
    at /vol/gcc/src/hg/trunk/local/gcc/ipa-inline.c:1718
#4  0x08ed84e4 in ipa_inline ()
    at /vol/gcc/src/hg/trunk/local/gcc/ipa-inline.c:2178
#5  (anonymous namespace)::pass_ipa_inline::execute (this=<optimized out>)
    at /vol/gcc/src/hg/trunk/local/gcc/ipa-inline.c:2550
#6  0x087f94b3 in execute_one_pass (pass=0x98f7fd0)
    at /vol/gcc/src/hg/trunk/local/gcc/passes.c:2326
#7  0x087f9fdd in execute_ipa_pass_list (pass=0x98f7fd0)
    at /vol/gcc/src/hg/trunk/local/gcc/passes.c:2723
#8  0x0850cd02 in ipa_passes ()
    at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:2133
#9  symbol_table::compile (this=this@entry=0xfea09000)
    at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:2221
#10 0x0850eda7 in compile (this=0xfea09000)
    at /vol/gcc/src/hg/trunk/local/gcc/timevar.h:110
#11 symbol_table::finalize_compilation_unit (this=0xfea09000)
    at /vol/gcc/src/hg/trunk/local/gcc/cgraphunit.c:2370
#12 0x082fcd2e in cp_write_global_declarations ()
    at /vol/gcc/src/hg/trunk/local/gcc/cp/decl2.c:4750
#13 0x088b7819 in compile_file ()
    at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:606
#14 0x091fa5e9 in do_compile ()
    at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:2045
#15 toplev::main (this=0x804759f, argc=8, argv=0x80475e0)
    at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:2142
#16 0x091fb27f in main (argc=8, argv=0x80475e0)
    at /vol/gcc/src/hg/trunk/local/gcc/main.c:38

On Solaris 11 and Linux, I find

Considering static EnumStatusCode ValueHelper::getLocalizedText(const
ValueStruct*, LocalizedText&)/26 with 17 size
 to be inlined into static LocalizedText ValueHelper::getLocalizedText(const
ValueStruct*)/15 in (null):0

i.e. fprintf(NULL), which doesn't work in every libc.

  Rainer


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

* [Bug ipa/64730] [5 Regression] g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL
  2015-01-22 12:56 [Bug ipa/64730] New: g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL ro at gcc dot gnu.org
  2015-01-22 12:56 ` [Bug ipa/64730] " ro at gcc dot gnu.org
@ 2015-01-22 13:07 ` rguenth at gcc dot gnu.org
  2015-01-22 19:48 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-01-22 13:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
            Summary|g++.dg/ipa/pr64049-1.C ICE: |[5 Regression]
                   |SEGV when printing NULL     |g++.dg/ipa/pr64049-1.C ICE:
                   |                            |SEGV when printing NULL


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

* [Bug ipa/64730] [5 Regression] g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL
  2015-01-22 12:56 [Bug ipa/64730] New: g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL ro at gcc dot gnu.org
  2015-01-22 12:56 ` [Bug ipa/64730] " ro at gcc dot gnu.org
  2015-01-22 13:07 ` [Bug ipa/64730] [5 Regression] " rguenth at gcc dot gnu.org
@ 2015-01-22 19:48 ` pinskia at gcc dot gnu.org
  2015-01-26 14:51 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-01-22 19:48 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-01-22
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I will take this over.  I think Naveen swapped one expression that should not
have been swapped around.


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

* [Bug ipa/64730] [5 Regression] g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL
  2015-01-22 12:56 [Bug ipa/64730] New: g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-01-22 19:48 ` pinskia at gcc dot gnu.org
@ 2015-01-26 14:51 ` jakub at gcc dot gnu.org
  2015-01-26 19:08 ` pinskia at gcc dot gnu.org
  2015-01-26 21:33 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-26 14:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 34575
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34575&action=edit
gcc5-pr64730.patch

I don't think there was anything wrong with the patch, just there is a problem
that a non-NULL edge->call_stmt necessarily doesn't mean the call has a known
location.


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

* [Bug ipa/64730] [5 Regression] g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL
  2015-01-22 12:56 [Bug ipa/64730] New: g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-01-26 14:51 ` jakub at gcc dot gnu.org
@ 2015-01-26 19:08 ` pinskia at gcc dot gnu.org
  2015-01-26 21:33 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-01-26 19:08 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> Created attachment 34575 [details]
> gcc5-pr64730.patch
> 
> I don't think there was anything wrong with the patch, just there is a
> problem that a non-NULL edge->call_stmt necessarily doesn't mean the call
> has a known location.

Totally agree.  Assigning to Jakub since he has a patch.


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

* [Bug ipa/64730] [5 Regression] g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL
  2015-01-22 12:56 [Bug ipa/64730] New: g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-01-26 19:08 ` pinskia at gcc dot gnu.org
@ 2015-01-26 21:33 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-26 21:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Mon Jan 26 21:33:11 2015
New Revision: 220139

URL: https://gcc.gnu.org/viewcvs?rev=220139&root=gcc&view=rev
Log:
    PR ipa/64730
    * ipa-inline.c (inline_small_functions): Print "unknown" even
    if edge->call_stmt is non-NULL, but has builtins or unknown
    location.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-inline.c
    trunk/gcc/testsuite/ChangeLog


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

end of thread, other threads:[~2015-01-26 21:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-22 12:56 [Bug ipa/64730] New: g++.dg/ipa/pr64049-1.C ICE: SEGV when printing NULL ro at gcc dot gnu.org
2015-01-22 12:56 ` [Bug ipa/64730] " ro at gcc dot gnu.org
2015-01-22 13:07 ` [Bug ipa/64730] [5 Regression] " rguenth at gcc dot gnu.org
2015-01-22 19:48 ` pinskia at gcc dot gnu.org
2015-01-26 14:51 ` jakub at gcc dot gnu.org
2015-01-26 19:08 ` pinskia at gcc dot gnu.org
2015-01-26 21:33 ` jakub 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).