Bug 49454 - [4.7 Regression] /usr/include/libio.h:336:3: internal compiler error: Segmentation fault
Summary: [4.7 Regression] /usr/include/libio.h:336:3: internal compiler error: Segment...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: 4.7.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 49429
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-17 13:44 UTC by John David Anglin
Modified: 2019-08-30 11:30 UTC (History)
4 users (show)

See Also:
Host: hppa*-*-* (32-bit)
Target: hppa*-*-* (32-bit)
Build: hppa*-*-* (32-bit)
Known to work:
Known to fail:
Last reconfirmed: 2011-06-17 18:30:10


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2011-06-17 13:44:00 UTC
/home/dave/gnu/gcc/objdir/./gcc/xgcc -B/home/dave/gnu/gcc/objdir/./gcc/ -B/home/
dave/opt/gnu/gcc/gcc-4.5/hppa-linux/bin/ -B/home/dave/opt/gnu/gcc/gcc-4.5/hppa-l
inux/lib/ -isystem /home/dave/opt/gnu/gcc/gcc-4.5/hppa-linux/include -isystem /h
ome/dave/opt/gnu/gcc/gcc-4.5/hppa-linux/sys-include    -g -O2 -O2  -g -O2 -DIN_G
CC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototyp
es -Wold-style-definition  -isystem ./include  -fPIC -DELF=1 -DLINUX=1 -g -DHAVE
_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fbuilding-libgcc -fno-stack
-protector   -I. -I. -I../.././gcc -I../../../gcc/libgcc -I../../../gcc/libgcc/.
 -I../../../gcc/libgcc/../gcc -I../../../gcc/libgcc/../include    -o _negdi2.o -
MT _negdi2.o -MD -MP -MF _negdi2.dep -DL_negdi2 -c ../../../gcc/libgcc/../gcc/li
bgcc2.c \
          -fvisibility=hidden -DHIDE_EXPORTS
In file included from /usr/include/stdio.h:75:0,
                 from ../../../gcc/libgcc/../gcc/tsystem.h:87,
                 from ../../../gcc/libgcc/../gcc/libgcc2.c:29:
/usr/include/libio.h:336:3: internal compiler error: Segmentation fault

This is in stage2.

First seen in revision 175083.  175007 was ok.
Comment 1 Steve Ellcey 2011-06-17 18:30:10 UTC
This is caused by r175063, the same change that caused pr49429.
Comment 2 Steve Ellcey 2011-06-21 15:48:14 UTC
I built an hppa2.0w-hp-hpux11.11 compiler with --disable-bootstrap and then ran the test suite to see if I could get a smaller test case.  The tests are still running but there are many failures with -O1 and higher levels of optimization.

One small example is gcc.c-torture/execute/20000717-1.c, which fails during execution at -O1, -O2, -O3, -Os.

Here are some other tests that fail at -O1:

FAIL: gcc.c-torture/execute/20000706-1.c execution,  -O1 
FAIL: gcc.c-torture/execute/20000706-2.c execution,  -O1 
FAIL: gcc.c-torture/execute/20000706-5.c execution,  -O1 
FAIL: gcc.c-torture/execute/20000717-5.c execution,  -O1 
FAIL: gcc.c-torture/execute/20011113-1.c execution,  -O1 
FAIL: gcc.c-torture/execute/20020215-1.c execution,  -O1
Comment 3 Steve Ellcey 2011-06-21 16:26:44 UTC
I should have mentioned in comment #2 that the build and test I did included the proposed patch in comment #11 pf PR 49429.
Comment 4 dave 2011-06-21 17:23:27 UTC
> I should have mentioned in comment #2 that the build and test I did included
> the proposed patch in comment #11 pf PR 49429.

I assumed so.  Richard's comments regarding the patch indicated that
it was unlikely to fix all the problems on hppa (a callee copies target).

Dave
Comment 5 eraman 2011-06-24 17:10:23 UTC
Author: eraman
Date: Fri Jun 24 17:10:18 2011
New Revision: 175384

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175384
Log:
2011-06-24  Easwaran Raman  <eraman@google.com>

      PR rtl-optimization/49429
      PR target/49454
      * expr.c (emit_block_move_hints):  Mark MEM_EXPR(x) and
      MEM_EXPR(y) addressable if emit_block_move_via_libcall is
      used to copy y into x.
      * calls.c (initialize_argument_information): Mark
      an argument addressable if it is passed by invisible reference.
      (emit_library_call_value_1): Mark  MEM_EXPR (val) addressable
      if it is passed by reference.



Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/calls.c
    trunk/gcc/expr.c
Comment 6 John David Anglin 2011-06-25 21:53:27 UTC
Fixed.
Comment 7 Eric Botcazou 2011-06-25 22:07:05 UTC
As Dave said.
Comment 8 Alexandre Oliva 2015-11-03 04:28:13 UTC
Would you guys with access to the affected platforms please let me know in case revision 229696, just installed in the trunk, regresses this?
Comment 9 Jakub Jelinek 2019-01-22 09:10:59 UTC
Author: jakub
Date: Tue Jan 22 09:10:25 2019
New Revision: 268138

URL: https://gcc.gnu.org/viewcvs?rev=268138&root=gcc&view=rev
Log:
	PR rtl-optimization/49429
	PR target/49454
	PR rtl-optimization/86334
	PR target/88906
	* expr.c (emit_block_move_hints): Move marking of MEM_EXPRs
	addressable from here...
	(emit_block_op_via_libcall): ... to here.

	* gcc.target/i386/pr86334.c: New test.
	* gcc.target/i386/pr88906.c: New test.

Added:
    trunk/gcc/testsuite/gcc.target/i386/pr86334.c
    trunk/gcc/testsuite/gcc.target/i386/pr88906.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/expr.c
    trunk/gcc/testsuite/ChangeLog
Comment 10 Jakub Jelinek 2019-02-07 14:36:01 UTC
Author: jakub
Date: Thu Feb  7 14:35:30 2019
New Revision: 268626

URL: https://gcc.gnu.org/viewcvs?rev=268626&root=gcc&view=rev
Log:
	Backported from mainline
	2019-01-22  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/49429
	PR target/49454
	PR rtl-optimization/86334
	PR target/88906
	* expr.c (emit_block_move_hints): Move marking of MEM_EXPRs
	addressable from here...
	(emit_block_op_via_libcall): ... to here.

	* gcc.target/i386/pr86334.c: New test.
	* gcc.target/i386/pr88906.c: New test.

Added:
    branches/gcc-8-branch/gcc/testsuite/gcc.target/i386/pr86334.c
    branches/gcc-8-branch/gcc/testsuite/gcc.target/i386/pr88906.c
Modified:
    branches/gcc-8-branch/gcc/ChangeLog
    branches/gcc-8-branch/gcc/expr.c
    branches/gcc-8-branch/gcc/testsuite/ChangeLog
Comment 11 Jakub Jelinek 2019-08-30 11:30:28 UTC
Author: jakub
Date: Fri Aug 30 11:29:57 2019
New Revision: 275090

URL: https://gcc.gnu.org/viewcvs?rev=275090&root=gcc&view=rev
Log:
	Backported from mainline
	2019-01-22  Jakub Jelinek  <jakub@redhat.com>

	PR rtl-optimization/49429
	PR target/49454
	PR rtl-optimization/86334
	PR target/88906
	* expr.c (emit_block_move_hints): Move marking of MEM_EXPRs
	addressable from here...
	(emit_block_op_via_libcall): ... to here.

	* gcc.target/i386/pr86334.c: New test.
	* gcc.target/i386/pr88906.c: New test.

Added:
    branches/gcc-7-branch/gcc/testsuite/gcc.target/i386/pr86334.c
    branches/gcc-7-branch/gcc/testsuite/gcc.target/i386/pr88906.c
Modified:
    branches/gcc-7-branch/gcc/ChangeLog
    branches/gcc-7-branch/gcc/expr.c
    branches/gcc-7-branch/gcc/testsuite/ChangeLog