public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/33703]  New: ../../gcc/libcpp/directives.c:1878: internal compiler error: Segmentation fault
@ 2007-10-08 22:06 danglin at gcc dot gnu dot org
  2007-10-08 22:08 ` [Bug tree-optimization/33703] " danglin at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: danglin at gcc dot gnu dot org @ 2007-10-08 22:06 UTC (permalink / raw)
  To: gcc-bugs

/xxx/gnu/gcc/objdir/./prev-gcc/xgcc -B/xxx/gnu/gcc/objdir/./prev-gcc/
-B/opt/gnu
64/gcc/gcc-4.3.0/hppa64-hp-hpux11.00/bin/  -I../../gcc/libcpp -I.
-I../../gcc/li
bcpp/../include -I../../gcc/libcpp/include  -g -O2 -W -Wall -Wwrite-strings
-Wst
rict-prototypes -Wmissing-prototypes -Wold-style-definition
-Wmissing-format-att
ribute -pedantic -Wno-long-long -Werror -I../../gcc/libcpp -I.
-I../../gcc/libcp
p/../include -I../../gcc/libcpp/include  -c -o directives.o -MT directives.o
-MM
D -MP -MF .deps/directives.Po ../../gcc/libcpp/directives.c
../../gcc/libcpp/directives.c: In function 'parse_assertion':
../../gcc/libcpp/directives.c:1878: internal compiler error: Segmentation fault
Please submit a full bug report,

-bash-3.2$ ./xgcc -B./ -v
Reading specs from ./specs
Target: hppa64-hp-hpux11.00
Configured with: ../gcc/configure --with-gnu-as --with-as=/opt/gnu64/bin/as
--with-ld=/usr/ccs/bin/ld --enable-shared --with-local-prefix=/opt/gnu64
--prefix=/opt/gnu64/gcc/gcc-4.3.0 --build=hppa64-hp-hpux11.00 --disable-nls
--with-gmp=/opt/gnu64/gcc/gcc-4.3.0
--enable-languages=c,c++,fortran,objc,obj-c++
Thread model: posix
gcc version 4.3.0 20071008 (experimental) [trunk revision 129120] (GCC)

(gdb) c
Continuing.
GNU C (GCC) version 4.3.0 20071008 (experimental) [trunk revision 129120]
(hppa64-hp-hpux11.00)
        compiled by GNU C version 4.3.0 20071008 (experimental) [trunk revision
129120], GMP version 4.2.1, MPFR version 2.2.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
options passed:  -I../../gcc/libcpp -I. -I../../gcc/libcpp/../include
 -I../../gcc/libcpp/include -I../../gcc/libcpp -I.
 -I../../gcc/libcpp/../include -I../../gcc/libcpp/include -iprefix
 /home/gnu/gcc/objdir/prev-gcc/../lib/gcc/hppa64-hp-hpux11.00/4.3.0/
 -isystem /xxx/gnu/gcc/objdir/./prev-gcc/include -isystem
 /xxx/gnu/gcc/objdir/./prev-gcc/include-fixed -MMD directives.d -MF
 .deps/directives.Po -MP -MT directives.o ../../gcc/libcpp/directives.c
 -auxbase-strip directives.o -g -O2 -W -Wall -Wwrite-strings
 -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
 -Wmissing-format-attribute -pedantic -Wno-long-long -Werror
options enabled:  -fPIC -falign-functions -falign-jumps -falign-labels
 -fargument-alias -fauto-inc-dec -fbranch-count-reg -fcaller-saves -fcommon
 -fcprop-registers -fcrossjumping -fcse-follow-jumps -fdefer-pop
 -fdelayed-branch -fdelete-null-pointer-checks -fearly-inlining
 -feliminate-unused-debug-types -fexpensive-optimizations
 -fforward-propagate -ffunction-cse -fgcse -fgcse-lm
 -fguess-branch-probability -fident -fif-conversion -fif-conversion2
 -finline-functions-called-once -finline-small-functions -fipa-pure-const
 -fipa-reference -fipa-type-escape -fivopts -fkeep-static-consts
 -fleading-underscore -fmath-errno -fmerge-constants -fmove-loop-invariants
 -fomit-frame-pointer -foptimize-register-move -foptimize-sibling-calls
 -fpeephole -fpeephole2 -freg-struct-return -fregmove -freorder-blocks
 -freorder-functions -frerun-cse-after-loop -fsched-interblock -fsched-spec
 -fsched-stalled-insns-dep -fschedule-insns -fschedule-insns2 -fshow-column
 -fsigned-zeros -fsplit-ivs-in-unroller -fsplit-wide-types
 -fstrict-aliasing -fstrict-overflow -fthread-jumps -ftoplevel-reorder
 -ftrapping-math -ftree-ccp -ftree-ch -ftree-copy-prop -ftree-copyrename
 -ftree-cselim -ftree-dce -ftree-dominator-opts -ftree-dse -ftree-fre
 -ftree-loop-im -ftree-loop-ivcanon -ftree-loop-optimize
 -ftree-parallelize-loops= -ftree-pre -ftree-reassoc -ftree-salias
 -ftree-scev-cprop -ftree-sink -ftree-sra -ftree-store-ccp
 -ftree-store-copy-prop -ftree-ter -ftree-vect-loop-version -ftree-vrp
 -funit-at-a-time -fvar-tracking -fzero-initialized-in-bss -mbig-switch
 -mgas -mspace-regs
Compiler executable checksum: b4408133498cfce175d1b03f56ad3cbc
 cpp_in_system_header cpp_in_primary_file ustrcmp ustrncmp ustrcspn ustrlen
uxstrdup ustrchr ufputs skip_rest_of_line check_eol check_eol_return_comments
start_directive end_directive prepare_directive_trad directive_diagnostics
_cpp_handle_directive run_directive lex_macro_node do_define do_undef
undefine_macros cpp_undef_all glue_header_name parse_include do_include_common
do_include do_import do_include_next read_flag strtoul_for_line do_line
do_linemarker _cpp_do_file_change do_diagnostic do_error do_warning do_ident
lookup_pragma_entry new_pragma_entry register_pragma_1 register_pragma_internal
cpp_register_pragma cpp_register_deferred_pragma _cpp_init_internal_pragmas
count_registered_pragmas save_registered_pragmas _cpp_save_pragma_names
restore_registered_pragmas _cpp_restore_pragma_names do_pragma do_pragma_once
do_pragma_poison do_pragma_system_header do_pragma_dependency
get_token_no_padding get__Pragma_string destringize_and_run {GC 5364k -> 4263k}
_cpp_do__Pragma do_ifdef do_ifndef do_if do_else do_elif do_endif
push_conditional parse_answer parse_assertion find_answer _cpp_test_assertion
do_assert do_unassert cpp_define _cpp_define_builtin cpp_undef
lex_macro_node_from_str cpp_push_definition cpp_pop_definition cpp_assert
cpp_unassert handle_assertion cpp_errors cpp_get_options cpp_get_callbacks
cpp_set_callbacks cpp_get_deps cpp_push_buffer _cpp_pop_buffer
_cpp_init_directives
Analyzing compilation unit
 {GC 5553k -> 4923k}Performing interprocedural optimizations
 <visibility> <early_local_cleanups> <inline> <static-var> <pure-const>
<type-escape-var>Assembling functions:
 undefine_macros count_registered_pragmas cpp_errors cpp_get_options
cpp_get_callbacks cpp_set_callbacks _cpp_init_directives parse_assertion
Program received signal SIGSEGV, Segmentation fault.
get_qualified_type (type=0x0, type_quals=0) at ../../gcc/gcc/tree.c:4164
4164      if (TYPE_QUALS (type) == type_quals)
(gdb) bt
#0  get_qualified_type (type=0x0, type_quals=0) at ../../gcc/gcc/tree.c:4164
#1  0x400000000065d284 in build_qualified_type (type=0x0, type_quals=0)
    at ../../gcc/gcc/tree.c:4186
#2  0x40000000003806ec in create_tmp_var_raw (type=0x0,
    prefix=0x40000000000e13f0 "doubledereftmp")
    at ../../gcc/gcc/gimplify.c:459
#3  0x4000000000600584 in process_constraint_1 (t=<value optimized out>,
    from_call=0 '\0') at ../../gcc/gcc/tree-ssa-structalias.c:2563
#4  0x4000000000600764 in process_constraint (t=0x0)
    at ../../gcc/gcc/tree-ssa-structalias.c:2600
#5  0x4000000000603ed0 in do_structure_copy (lhsop=<value optimized out>,
    rhsop=<value optimized out>) at ../../gcc/gcc/tree-ssa-structalias.c:3207
#6  0x4000000000604d70 in find_func_aliases (origt=0x800003ffefcdc7b0)
    at ../../gcc/gcc/tree-ssa-structalias.c:3859
#7  0x4000000000609d20 in compute_points_to_sets (ai=0x8000000100197d30)
    at ../../gcc/gcc/tree-ssa-structalias.c:5370
#8  0x400000000055c61c in compute_may_aliases ()
    at ../../gcc/gcc/tree-ssa-alias.c:1719
#9  0x40000000003eea40 in execute_function_todo (data=0x0)
    at ../../gcc/gcc/passes.c:908
#10 0x40000000003ee5dc in do_per_function (callback=0x40000000001283c0,
    data=0x100001) at ../../gcc/gcc/passes.c:804
#11 0x40000000003ee754 in execute_todo (flags=0) at ../../gcc/gcc/passes.c:988
---Type <return> to continue, or q <return> to quit---
#12 0x40000000003eef58 in execute_one_pass (pass=0x80000001000301b0)
    at ../../gcc/gcc/passes.c:1139
#13 0x40000000003ef168 in execute_pass_list (pass=0x80000001000301b0)
    at ../../gcc/gcc/passes.c:1170
#14 0x40000000003ef184 in execute_pass_list (pass=0x800000010002fe08)
    at ../../gcc/gcc/passes.c:1171
#15 0x40000000005093d0 in tree_rest_of_compilation (fndecl=0x800003ffefaa7600)
    at ../../gcc/gcc/tree-optimize.c:404
#16 0x40000000006adad0 in cgraph_expand_function (node=0x800003ffeff9be00)
    at ../../gcc/gcc/cgraphunit.c:1060
#17 0x40000000006b0cb8 in cgraph_optimize ()
    at ../../gcc/gcc/cgraphunit.c:1123
#18 0x4000000000157948 in c_write_global_declarations ()
    at ../../gcc/gcc/c-decl.c:8077
#19 0x400000000049a22c in toplev_main (argc=<value optimized out>,
    argv=<value optimized out>) at ../../gcc/gcc/toplev.c:1052
#20 0x40000000001e5224 in main (argc=0, argv=0x0) at ../../gcc/gcc/main.c:35
(gdb) p type
$1 = (tree) 0x0

(gdb) p debug_tree (origt)
 <gimple_modify_stmt 800003ffefcdc7b0 side-effects
    arg 0 <array_ref 800003ffef873af0
        type <record_type 800003ffefbc1c30 cpp_token sizes-gimplified
asm_written BLK
            size <integer_cst 800003ffefdb9f90 constant invariant 192>
            unit size <integer_cst 800003ffefe32930 constant invariant 24>
            align 64 symtab -2147482625 alias set -1 canonical type
800003ffefbc19c0 fields <field_decl 800003ffefbbd580 src_loc> context
<translation_unit_decl 800003ffeff691a0 D.6372>
            pointer_to_this <pointer_type 800003ffefbc49c0>>

        arg 0 <component_ref 800003ffef873b40 type <array_type
800003ffefc1b680>

            arg 0 <indirect_ref 800003ffefab6f40 type <record_type
800003ffefbc3dd0 answer>

                arg 0 <ssa_name 800003ffef874ea0 type <pointer_type
800003ffefbf4a90>
                    visited var <var_decl 800003ffef875580 D.7208> def_stmt
<gimple_modify_stmt 800003ffefcdc720>
                    version 51>> arg 1 <field_decl 800003ffefc1d0b0 first>>
        arg 1 <ssa_name 800003ffef874f60 type <integer_type 800003ffefed8820
long unsigned int>
            visited var <var_decl 800003ffefc08e70 D.7198> def_stmt
<gimple_modify_stmt 800003ffefcdc750>
            version 52>>
    arg 1 <indirect_ref 800003ffefab6f80
        type <record_type 800003ffefbd8ea0 cpp_token readonly sizes-gimplified
asm_written BLK size <integer_cst 800003ffefdb9f90 192> unit size <integer_cst
800003ffefe32930 24>
            align 64 symtab -2147482625 alias set -1 canonical type
800003ffefbea000 fields <field_decl 800003ffefbbd580 src_loc> context
<translation_unit_decl 800003ffeff691a0 D.6372>
            pointer_to_this <pointer_type 800003ffefbea0d0>>

        arg 0 <ssa_name 800003ffef86ad20 type <pointer_type 800003ffefbea0d0>
            visited var <var_decl 800003ffef85ddc0 token> def_stmt
<gimple_modify_stmt 800003ffefce8930>
            version 33
            ptr-info 800003ffef872ee0>>
    ../../gcc/libcpp/directives.c:1852>


-- 
           Summary: ../../gcc/libcpp/directives.c:1878: internal compiler
                    error: Segmentation fault
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa64-hp-hpux11.00
  GCC host triplet: hppa64-hp-hpux11.00
GCC target triplet: hppa64-hp-hpux11.00


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


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

* [Bug tree-optimization/33703] ../../gcc/libcpp/directives.c:1878: internal compiler error: Segmentation fault
  2007-10-08 22:06 [Bug tree-optimization/33703] New: ../../gcc/libcpp/directives.c:1878: internal compiler error: Segmentation fault danglin at gcc dot gnu dot org
@ 2007-10-08 22:08 ` danglin at gcc dot gnu dot org
  2007-10-09  1:33 ` danglin at gcc dot gnu dot org
  2008-10-10 15:12 ` ro at techfak dot uni-bielefeld dot de
  2 siblings, 0 replies; 4+ messages in thread
From: danglin at gcc dot gnu dot org @ 2007-10-08 22:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from danglin at gcc dot gnu dot org  2007-10-08 22:08 -------
Last successful build was revision 128895, 20070930.


-- 


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


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

* [Bug tree-optimization/33703] ../../gcc/libcpp/directives.c:1878: internal compiler error: Segmentation fault
  2007-10-08 22:06 [Bug tree-optimization/33703] New: ../../gcc/libcpp/directives.c:1878: internal compiler error: Segmentation fault danglin at gcc dot gnu dot org
  2007-10-08 22:08 ` [Bug tree-optimization/33703] " danglin at gcc dot gnu dot org
@ 2007-10-09  1:33 ` danglin at gcc dot gnu dot org
  2008-10-10 15:12 ` ro at techfak dot uni-bielefeld dot de
  2 siblings, 0 replies; 4+ messages in thread
From: danglin at gcc dot gnu dot org @ 2007-10-09  1:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from danglin at gcc dot gnu dot org  2007-10-09 01:33 -------
This is another manifistation of the tree-sra.c change.  Forgot,
to install Alex's proposed fix.

*** This bug has been marked as a duplicate of 33634 ***


-- 

danglin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

* [Bug tree-optimization/33703] ../../gcc/libcpp/directives.c:1878: internal compiler error: Segmentation fault
  2007-10-08 22:06 [Bug tree-optimization/33703] New: ../../gcc/libcpp/directives.c:1878: internal compiler error: Segmentation fault danglin at gcc dot gnu dot org
  2007-10-08 22:08 ` [Bug tree-optimization/33703] " danglin at gcc dot gnu dot org
  2007-10-09  1:33 ` danglin at gcc dot gnu dot org
@ 2008-10-10 15:12 ` ro at techfak dot uni-bielefeld dot de
  2 siblings, 0 replies; 4+ messages in thread
From: ro at techfak dot uni-bielefeld dot de @ 2008-10-10 15:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ro at techfak dot uni-bielefeld dot de  2008-10-10 15:11 -------
Subject:  Ada testsuites lack multilib support

While testing the fix for PR ada/37681, I tried to test both multilibs
(default and amd64) on i386-pc-solaris2.10, and found that I had to make
the following changes:

* For ada/acats, the necessary changes are restricted to the run_acats
  script:

--- run_acats.save      Wed May 30 17:59:57 2007
+++ run_acats   Thu Oct  9 17:55:35 2008
@@ -13,7 +13,7 @@
 BASE=`cd $ROOT/../../..; ${PWDCMD-pwd}`

 PATH=$BASE:$ROOT:$PATH
-ADA_INCLUDE_PATH=$BASE/ada/rts
+ADA_INCLUDE_PATH=$BASE/ada/rts_sparcv9
 LD_LIBRARY_PATH=$ADA_INCLUDE_PATH:$BASE:$LD_LIBRARY_PATH
 ADA_OBJECTS_PATH=$ADA_INCLUDE_PATH

@@ -33,7 +33,7 @@
 fi

 GCC_DRIVER="$BASE/xgcc"
-GCC="$BASE/xgcc -B$BASE/"
+GCC="$BASE/xgcc -B$BASE/ -m64"
 export PATH ADA_INCLUDE_PATH ADA_OBJECTS_PATH GCC_DRIVER GCC LD_LIBRARY_PATH

 echo '#!/bin/sh' > host_gnatchop

  To properly handle this, the script needs to iterate over the available
  multilibs and append _<multilib dir> to $ADA_INCLUDE_PATH and the
  multilib flag to $GCC.

  One problem here is that unlike the dejagnu based testsuite, where the
  user can influence the multilibs to test via the RUNTESTFLAGS environment
  variable, it seems to be unnecessarily complex to parse that
  dejagnu-specific variable (which might look like

  --target_board "unix{,-m64}"

  in the present case), so instead the default should be to iterate over
  all available multilibs.

* For gnat, the situation is similar with one twist:

--- gnat.exp.save       Mon Sep  3 18:05:02 2007
+++ gnat.exp    Thu Oct  9 17:54:58 2008
@@ -127,10 +127,10 @@
     global ld_library_path
     global gnat_libgcc_s_path

-    setenv ADA_INCLUDE_PATH "${rootme}/ada/rts"
+    setenv ADA_INCLUDE_PATH "${rootme}/ada/rts_amd64"
     set ld_library_path ".:${gnat_libgcc_s_path}"
     lappend options "compiler=$GNAT_UNDER_TEST -q -f"
-    lappend options "incdir=${rootme}/ada/rts"
+    lappend options "incdir=${rootme}/ada/rts_amd64"

     if { [target_info needs_status_wrapper]!="" && [info exists gluefile] } {
        lappend options "libs=${gluefile}"
@@ -244,7 +244,7 @@
            }
            if { $file != "" } {
                set root [file dirname $file]
-               set CC "$file -I$root/ada/rts --GCC=$root/xgcc
--GNATBIND=$root/gnatbind --GNATLINK=$root/gnatlink -cargs -B$root -largs
--GCC=$root/xgcc -B$root -margs";
+               set CC "$file -I$root/ada/rts_amd64 --GCC=$root/xgcc
--GNATBIND=$root/gnatbind --GNATLINK=$root/gnatlink -cargs -B$root -largs
--GCC=$root/xgcc -B$root -m64 -margs";
            } else {
                set CC [transform gnatmake]
            }

  Again, one needs to add _<multilib dir> to ADA_INCLUDE_PATH and friends.
  The multilib flag is already appended to $CC by the dejagnu framework,
  but one issue remains: unlike gnatmake, gnatlink doesn't pass unknown
  flags (like -m64 in this case) to gcc, but ignores them.  If invoking
  gnatlink via the shell, it is possible to use

  -largs --GCC="$root/xgcc -B$root -m64"

  and pass -B and -m64 through gnatlink.  With the dejagnu/tcl framework,
  I've found no way to achieve the same effect, i.e. to pass a single
  argument which includes whitespace.  Maybe some testsuite expert can help
  here?

  If this were not done, compilations performed by gnatlink `behind the
  scenes' would produce objects for the default multilib, leading to link
  failures in the final link step.

  As a workaround, I've replaced xgcc by a script that always passes -m64:

#!/bin/sh

exec $0.bin -m64 "$@"

With those changes, I could at least manually test both multilibs on
sparc-sun-solaris2.11 and i386-pc-solaris2.10.

        Rainer


-- 


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


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

end of thread, other threads:[~2008-10-10 15:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-08 22:06 [Bug tree-optimization/33703] New: ../../gcc/libcpp/directives.c:1878: internal compiler error: Segmentation fault danglin at gcc dot gnu dot org
2007-10-08 22:08 ` [Bug tree-optimization/33703] " danglin at gcc dot gnu dot org
2007-10-09  1:33 ` danglin at gcc dot gnu dot org
2008-10-10 15:12 ` ro at techfak dot uni-bielefeld dot de

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).