public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/13540] New: [3.4 regression] gnat1 segmentation fault
@ 2004-01-01 20:49 danglin at gcc dot gnu dot org
  2004-01-01 20:51 ` [Bug optimization/13540] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2004-01-01 20:49 UTC (permalink / raw)
  To: gcc-bugs

stage2/xgcc -Bstage2/ -B/home/dave/opt/gnu/gcc/gcc-3.4/hppa-linux/bin/ -c -g -O2
      -gnatpg -gnata -g -O1 -fno-inline \
 -I- -I. -Iada -I../../gcc/gcc/ada ../../gcc/gcc/ada/a-except.adb -o ada/a-excep
t.o
+===========================GNAT BUG DETECTED==============================+
| 3.4.0 20040101 (experimental) (hppa-unknown-linux-gnu) Segmentation fault|
| No source file position information available                            |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact gcc or gnatmake command that you entered.              |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.


compilation abandoned

Update for last successful build was at Wed Dec 31 15:09:06 UTC 2003.

I didn't have much luck in debugging this:

(gdb) r `cat xx.sh`
Starting program: /home/dave/gcc-3.4/objdir/gcc/stage2/gnat1 `cat xx.sh`
During symbol reading, unsupported tag: 'DW_TAG_subrange_type'.
During symbol reading, unexepected tag in read_type_die: 'DW_TAG_subrange_type'.
Die: DW_TAG_subrange_type (abbrev = 33, offset = 267998)
        has children: FALSE
        attributes:
                DW_AT_name (DW_FORM_strp) string: "atree__paren_count_type"
                DW_AT_lower_bound (DW_FORM_data1) constant: 0
                DW_AT_upper_bound (DW_FORM_data1) constant: 3
                DW_AT_type (DW_FORM_ref4) constant: 3859
Dwarf Error: Cannot find type of die [in module /home/dave/gcc-3.4/objdir/gcc/
stage2/gnat1]

This is with gdb 6.0.  With 5.3-debian,

(gdb) r `cat xx.sh`
Starting program: /home/dave/gcc-3.4/objdir/gcc/stage2/gnat1 `cat xx.sh`
internal error - unimplemented function unk_lang_create_fundamental_type called.

:(

-- 
           Summary: [3.4 regression] gnat1 segmentation fault
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: hppa-unknown-linux-gnu
  GCC host triplet: hppa-unknown-linux-gnu
GCC target triplet: hppa-unknown-linux-gnu


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


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

* [Bug optimization/13540] [3.4 regression] gnat1 segmentation fault
  2004-01-01 20:49 [Bug bootstrap/13540] New: [3.4 regression] gnat1 segmentation fault danglin at gcc dot gnu dot org
@ 2004-01-01 20:51 ` pinskia at gcc dot gnu dot org
  2004-01-02  0:26 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-01 20:51 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
          Component|bootstrap                   |optimization
           Keywords|                            |build, ice-on-valid-code,
                   |                            |wrong-code
   Target Milestone|---                         |3.4.0


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


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

* [Bug optimization/13540] [3.4 regression] gnat1 segmentation fault
  2004-01-01 20:49 [Bug bootstrap/13540] New: [3.4 regression] gnat1 segmentation fault danglin at gcc dot gnu dot org
  2004-01-01 20:51 ` [Bug optimization/13540] " pinskia at gcc dot gnu dot org
@ 2004-01-02  0:26 ` dave at hiauly1 dot hia dot nrc dot ca
  2004-01-02  0:36 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2004-01-02  0:26 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dave at hiauly1 dot hia dot nrc dot ca  2004-01-02 00:26 -------
Subject: Re:  New: [3.4 regression] gnat1 segmentation fa

Using -gstabs, I was able to obtain the following additional
information.  The fault occurs in atree__nkind.  This is the
backtrace:

#0  atree__nkind (n=4210035656) at ../../gcc/gcc/ada/atree.adb:1963
#1  0x000742d4 in atree__ekind (e=4210035656)
    at ../../gcc/gcc/ada/atree.adb:703
#2  0x00094ec4 in einfo__base_type (id=4210035656)
    at ../../gcc/gcc/ada/einfo.adb:4457
#3  0x001e0590 in sem_ch6__conforming_types__base_types_match___11 (t1=6158,
    t2=4210035656) at ../../gcc/gcc/ada/sem_ch6.adb:2963
#4  0x001e064c in sem_ch6__conforming_types (t1=4210035656, t2=4210035656,
    ctype=sem_ch6__type_conformant__2, get_inst=false)
    at ../../gcc/gcc/ada/sem_ch6.adb:2985
#5  0x001decd4 in sem_ch6__check_conformance (new_id=1112, old_id=8440,
    ctype=sem_ch6__type_conformant__2, errmsg=16777215, err_loc=0, get_inst=0)
    at ../../gcc/gcc/ada/sem_ch6.adb:1944
#6  0x001e495c in sem_ch6__type_conformant (new_id=4210035656,
    old_id=4210035656) at ../../gcc/gcc/ada/sem_ch6.adb:5202
#7  0x002289b4 in sem_type__collect_interps (n=8463)
    at ../../gcc/gcc/ada/sem_type.adb:514
#8  0x001ecc10 in sem_ch8__find_direct_name (n=8463)
    at ../../gcc/gcc/ada/sem_ch8.adb:3052
#9  0x001824f0 in sem__analyze (n=8463) at ../../gcc/gcc/ada/sem.adb:289
#10 0x0020b48c in sem_prag__analyze_pragma__check_arg_is_local_name___11 (
    arg=8464) at ../../gcc/gcc/ada/sem_prag.adb:644
#11 0x0020d8d8 in sem_prag__analyze_pragma__process_convention___44 ()
    at ../../gcc/gcc/ada/sem_prag.adb:1793
#12 0x00216018 in sem_prag__analyze_pragma (n=8459)
    at ../../gcc/gcc/ada/sem_prag.adb:4493
#13 0x001824c0 in sem__analyze (n=8459) at ../../gcc/gcc/ada/sem.adb:397
#14 0x001bac08 in sem_ch3__analyze_declarations (l=-99999312)
    at ../../gcc/gcc/ada/sem_ch3.adb:1050
#15 0x001e5db8 in sem_ch7__analyze_package_specification (n=8363)
    at ../../gcc/gcc/ada/sem_ch7.adb:798
#16 0x001826a8 in sem__analyze (n=8363) at ../../gcc/gcc/ada/sem.adb:391
#17 0x001e5698 in sem_ch7__analyze_package_declaration (n=8666)
    at ../../gcc/gcc/ada/sem_ch7.adb:644
#18 0x00181f74 in sem__analyze (n=8666) at ../../gcc/gcc/ada/sem.adb:382
#19 0x00196854 in sem_ch10__analyze_compilation_unit (n=8354)
    at ../../gcc/gcc/ada/sem_ch10.adb:480
#20 0x001825f8 in sem__analyze (n=8354) at ../../gcc/gcc/ada/sem.adb:136
#21 0x00183424 in ::sem__semantics__do_analyze_ ()
    at ../../gcc/gcc/ada/sem.adb:1253
#22 0x001836c4 in sem__semantics (comp_unit=8354)
    at ../../gcc/gcc/ada/sem.adb:1302
#23 0x00198768 in sem_ch10__analyze_with_clause (n=8162)
    at ../../gcc/gcc/ada/sem_ch10.adb:1628
#24 0x00182708 in sem__analyze (n=8162) at ../../gcc/gcc/ada/sem.adb:539
#25 0x00197448 in sem_ch10__analyze_context (n=8160)
    at ../../gcc/gcc/ada/sem_ch10.adb:813
#26 0x0019662c in sem_ch10__analyze_compilation_unit (n=8160)
    at ../../gcc/gcc/ada/sem_ch10.adb:317
#27 0x001825f8 in sem__analyze (n=8160) at ../../gcc/gcc/ada/sem.adb:136
#28 0x00183424 in ::sem__semantics__do_analyze_ ()
    at ../../gcc/gcc/ada/sem.adb:1253
#29 0x001836c4 in sem__semantics (comp_unit=8160)
    at ../../gcc/gcc/ada/sem.adb:1302
#30 0x00198768 in sem_ch10__analyze_with_clause (n=7250)
    at ../../gcc/gcc/ada/sem_ch10.adb:1628
#31 0x00182708 in sem__analyze (n=7250) at ../../gcc/gcc/ada/sem.adb:539
#32 0x00197448 in sem_ch10__analyze_context (n=7244)
    at ../../gcc/gcc/ada/sem_ch10.adb:813
#33 0x0019662c in sem_ch10__analyze_compilation_unit (n=7244)
    at ../../gcc/gcc/ada/sem_ch10.adb:317
#34 0x001825f8 in sem__analyze (n=7244) at ../../gcc/gcc/ada/sem.adb:136
#35 0x00183424 in ::sem__semantics__do_analyze_ ()
    at ../../gcc/gcc/ada/sem.adb:1253
#36 0x001836c4 in sem__semantics (comp_unit=7244)
    at ../../gcc/gcc/ada/sem.adb:1302
#37 0x00198768 in sem_ch10__analyze_with_clause (n=1387)
    at ../../gcc/gcc/ada/sem_ch10.adb:1628
#38 0x00182708 in sem__analyze (n=1387) at ../../gcc/gcc/ada/sem.adb:539
#39 0x00197448 in sem_ch10__analyze_context (n=1373)
    at ../../gcc/gcc/ada/sem_ch10.adb:813
#40 0x0019662c in sem_ch10__analyze_compilation_unit (n=1373)
    at ../../gcc/gcc/ada/sem_ch10.adb:317
#41 0x001825f8 in sem__analyze (n=1373) at ../../gcc/gcc/ada/sem.adb:136
#42 0x00183424 in ::sem__semantics__do_analyze_ ()
    at ../../gcc/gcc/ada/sem.adb:1253
#43 0x001836c4 in sem__semantics (comp_unit=1373)
    at ../../gcc/gcc/ada/sem.adb:1302
#44 0x00120828 in _ada_frontend () at ../../gcc/gcc/ada/frontend.adb:305
#45 0x0026fd18 in _ada_gnat1drv () at ../../gcc/gcc/ada/gnat1drv.adb:278
#46 0x00427b24 in toplev_main (argc=6128672, argv=0x4f032c)
    at ../../gcc/gcc/toplev.c:1804
(gdb) disass
Dump of assembler code for function atree__nkind:
0x0007671c <atree__nkind+0>:    addil 40000,dp,%r1
0x00076720 <atree__nkind+4>:    depw,z r26,26,27,r26
0x00076724 <atree__nkind+8>:    ldw 34c(,r1),r19
0x00076728 <atree__nkind+12>:   add,l r26,r19,r26
0x0007672c <atree__nkind+16>:   bv r0(rp)
0x00076730 <atree__nkind+20>:   ldb 3(,r26),ret0

The segfault occurs at the ldb instruction.  The address is bad.

At 0x00076728, r26 == 0x5e017900 and r19 == 0x40208008.  r19
seems to be a reasonable base address.  The value being passed
in $r26 seems bogus and the cause of the segfault.

It looks as if one of the two commits by Jan this morning introduced
the problem.

Dave


-- 


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


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

* [Bug optimization/13540] [3.4 regression] gnat1 segmentation fault
  2004-01-01 20:49 [Bug bootstrap/13540] New: [3.4 regression] gnat1 segmentation fault danglin at gcc dot gnu dot org
  2004-01-01 20:51 ` [Bug optimization/13540] " pinskia at gcc dot gnu dot org
  2004-01-02  0:26 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2004-01-02  0:36 ` pinskia at gcc dot gnu dot org
  2004-01-02  2:50 ` danglin at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-02  0:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-02 00:36 -------
It is most likely not the second one and it if it is this part then there is another bug somewhere 
else:
        PR opt/12617
        * toplev.c (dump_file_index): Reorder ce3 and bbro.
        (dump_file): Likewise.
        (rest_of_compilation): Likewise.

Because it just moves around the order of optimizations to fix a regression.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-01-02 00:36:53
               date|                            |


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


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

* [Bug optimization/13540] [3.4 regression] gnat1 segmentation fault
  2004-01-01 20:49 [Bug bootstrap/13540] New: [3.4 regression] gnat1 segmentation fault danglin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-01-02  0:36 ` pinskia at gcc dot gnu dot org
@ 2004-01-02  2:50 ` danglin at gcc dot gnu dot org
  2004-01-02 11:28 ` jh at suse dot cz
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2004-01-02  2:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From danglin at gcc dot gnu dot org  2004-01-02 02:50 -------
This is the patch that introduced the regression:

2004-01-01  Jan Hubicka  <jh@suse.cz>

        * expmed.c (store_bit_field, extract_bit_field): Use new named patterns
        * expr.c (store_constructor): Use vec_init pattern.
        * genopinit.c (optabs): Initailize vec_set/vec_extract/vec_init.
        * optabs.h (optab_index): ADD OTI_vec_set/OTI_vec_extract/OTI_vec_init
        (vec_set_optab, vec_extract_optab, vec_init_optab): New.
        * i386.md (vec_setv2df, vec_extractv2df, vec_setv4sf, vec_extractv4sf):
        New patterns.
        (sse2_unpc?pd): Fix pattern.
        (sse2_movlpd): Kill.
        (sse2_movsd): Deal with movlpd too.
        * i386.c (ix86_expand_builtin): Use sse2_movsd instead of sse2_movlpd.
        (ix86_expand_vector_init): New.
        * emmintrin.h (__mm_set_pd, __mm_set_ps): Use vector extensions.
        * md.texi (vec_set, vec_extract): Document

This hunk of the patch seems suspect:

@@ -4958,12 +4994,17 @@
                  target = copy_rtx (target);
                  MEM_KEEP_ALIAS_SET_P (target) = 1;
                }
-
-             store_constructor_field (target, bitsize, bitpos, mode, value,
-                                      type, cleared, get_alias_set (elttype));
-
+             else
+               store_constructor_field (target, bitsize, bitpos, mode, value,
+                                        type, cleared, get_alias_set (elttype));
            }
        }
+      if (vector)
+       {
+         emit_insn (GEN_FCN (icode) (target,
+                                     gen_rtx_PARALLEL (GET_MODE (target),
+                                                       gen_rtvec_v (n_elts, 
vector))));
+       }
     }
 
   /* Set constructor assignments.  */

The failure also affects hppa2.0-hp-hpux11.00.





-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jh at suse dot cz


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


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

* [Bug optimization/13540] [3.4 regression] gnat1 segmentation fault
  2004-01-01 20:49 [Bug bootstrap/13540] New: [3.4 regression] gnat1 segmentation fault danglin at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-01-02  2:50 ` danglin at gcc dot gnu dot org
@ 2004-01-02 11:28 ` jh at suse dot cz
  2004-01-02 16:19 ` pinskia at gcc dot gnu dot org
  2004-01-02 20:34 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jh at suse dot cz @ 2004-01-02 11:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jh at suse dot cz  2004-01-02 11:28 -------
Subject: Re:  [3.4 regression] gnat1 segmentation fault

> 
> ------- Additional Comments From danglin at gcc dot gnu dot org  2004-01-02 02:50 -------
> This is the patch that introduced the regression:
> 
> 2004-01-01  Jan Hubicka  <jh@suse.cz>
> 
>         * expmed.c (store_bit_field, extract_bit_field): Use new named patterns
>         * expr.c (store_constructor): Use vec_init pattern.
>         * genopinit.c (optabs): Initailize vec_set/vec_extract/vec_init.
>         * optabs.h (optab_index): ADD OTI_vec_set/OTI_vec_extract/OTI_vec_init
>         (vec_set_optab, vec_extract_optab, vec_init_optab): New.
>         * i386.md (vec_setv2df, vec_extractv2df, vec_setv4sf, vec_extractv4sf):
>         New patterns.
>         (sse2_unpc?pd): Fix pattern.
>         (sse2_movlpd): Kill.
>         (sse2_movsd): Deal with movlpd too.
>         * i386.c (ix86_expand_builtin): Use sse2_movsd instead of sse2_movlpd.
>         (ix86_expand_vector_init): New.
>         * emmintrin.h (__mm_set_pd, __mm_set_ps): Use vector extensions.
>         * md.texi (vec_set, vec_extract): Document
> 
> This hunk of the patch seems suspect:
> 
> @@ -4958,12 +4994,17 @@
>                   target = copy_rtx (target);
>                   MEM_KEEP_ALIAS_SET_P (target) = 1;
>                 }
> -
> -             store_constructor_field (target, bitsize, bitpos, mode, value,
> -                                      type, cleared, get_alias_set (elttype));
> -
> +             else
> +               store_constructor_field (target, bitsize, bitpos, mode, value,
> +                                        type, cleared, get_alias_set (elttype));

This is a leftout of earlier version of patch.  I am undoing this
change.  Thanks!
Honza
>             }
>         }
> +      if (vector)
> +       {
> +         emit_insn (GEN_FCN (icode) (target,
> +                                     gen_rtx_PARALLEL (GET_MODE (target),
> +                                                       gen_rtvec_v (n_elts, 
> vector))));
> +       }
>      }
>  
>    /* Set constructor assignments.  */
> 
> The failure also affects hppa2.0-hp-hpux11.00.
> 
> 
> 
> 
> 
> -- 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |jh at suse dot cz
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13540
> 
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.


-- 


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


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

* [Bug optimization/13540] [3.4 regression] gnat1 segmentation fault
  2004-01-01 20:49 [Bug bootstrap/13540] New: [3.4 regression] gnat1 segmentation fault danglin at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-01-02 11:28 ` jh at suse dot cz
@ 2004-01-02 16:19 ` pinskia at gcc dot gnu dot org
  2004-01-02 20:34 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-02 16:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-02 16:19 -------
Should be fixed now, can you try again?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


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


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

* [Bug optimization/13540] [3.4 regression] gnat1 segmentation fault
  2004-01-01 20:49 [Bug bootstrap/13540] New: [3.4 regression] gnat1 segmentation fault danglin at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-01-02 16:19 ` pinskia at gcc dot gnu dot org
@ 2004-01-02 20:34 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-02 20:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-02 20:34 -------
This is fixed now.

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


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


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

end of thread, other threads:[~2004-01-02 20:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-01 20:49 [Bug bootstrap/13540] New: [3.4 regression] gnat1 segmentation fault danglin at gcc dot gnu dot org
2004-01-01 20:51 ` [Bug optimization/13540] " pinskia at gcc dot gnu dot org
2004-01-02  0:26 ` dave at hiauly1 dot hia dot nrc dot ca
2004-01-02  0:36 ` pinskia at gcc dot gnu dot org
2004-01-02  2:50 ` danglin at gcc dot gnu dot org
2004-01-02 11:28 ` jh at suse dot cz
2004-01-02 16:19 ` pinskia at gcc dot gnu dot org
2004-01-02 20:34 ` pinskia at gcc dot gnu dot 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).