Blame SOURCES/gdb-rhel5.9-testcase-xlf-var-inside-mod.patch

b2f73e
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
b2f73e
From: Fedora GDB patches <invalid@email.com>
b2f73e
Date: Fri, 27 Oct 2017 21:07:50 +0200
b2f73e
Subject: gdb-rhel5.9-testcase-xlf-var-inside-mod.patch
b2f73e
b2f73e
;; Include testcase for `Unable to see a variable inside a module (XLF)' (BZ 823789).
b2f73e
;;=fedoratest
b2f73e
b2f73e
diff --git a/gdb/testsuite/gdb.fortran/xlf-variable.S b/gdb/testsuite/gdb.fortran/xlf-variable.S
b2f73e
new file mode 100644
b2f73e
--- /dev/null
b2f73e
+++ b/gdb/testsuite/gdb.fortran/xlf-variable.S
b2f73e
@@ -0,0 +1,638 @@
b2f73e
+/* Copyright (C) 2012 Free Software Foundation, Inc.
b2f73e
+
b2f73e
+   This file is part of GDB.
b2f73e
+
b2f73e
+   This program is free software; you can redistribute it and/or modify
b2f73e
+   it under the terms of the GNU General Public License as published by
b2f73e
+   the Free Software Foundation; either version 3 of the License, or
b2f73e
+   (at your option) any later version.
b2f73e
+
b2f73e
+   This program is distributed in the hope that it will be useful,
b2f73e
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
b2f73e
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
b2f73e
+   GNU General Public License for more details.
b2f73e
+
b2f73e
+   You should have received a copy of the GNU General Public License
b2f73e
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
b2f73e
+
b2f73e
+/* This file has been generated from the file named `xlf-variable.f', which
b2f73e
+   should be present in this directory.  The command used to generate this
b2f73e
+   file was:
b2f73e
+
b2f73e
+     xlf -qnoopt -g9 -S xlf-variable.f -o xlf-variable.S
b2f73e
+
b2f73e
+   After issuing this command, you must hand-edit this file and remove the
b2f73e
+   mentions for `_xlfExit', since it is only present in XLF-specific
b2f73e
+   libraries.  You must also make sure to remove the file named `mod1.mod'
b2f73e
+   which will be created in the compilation directory.
b2f73e
+
b2f73e
+   In order to generated this file, the following XLF package was used:
b2f73e
+
b2f73e
+     xlf.14.1.0.0.linux.eval.tar.gz
b2f73e
+
b2f73e
+   These instructions may be different for different versions of the XLF
b2f73e
+   compiler.  */
b2f73e
+
b2f73e
+.set r0,0; .set SP,1; .set RTOC,2; .set r3,3; .set r4,4
b2f73e
+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
b2f73e
+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
b2f73e
+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
b2f73e
+.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
b2f73e
+.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
b2f73e
+.set r30,30; .set r31,31
b2f73e
+.set fp0,0; .set fp1,1; .set fp2,2; .set fp3,3; .set fp4,4
b2f73e
+.set fp5,5; .set fp6,6; .set fp7,7; .set fp8,8; .set fp9,9
b2f73e
+.set fp10,10; .set fp11,11; .set fp12,12; .set fp13,13; .set fp14,14
b2f73e
+.set fp15,15; .set fp16,16; .set fp17,17; .set fp18,18; .set fp19,19
b2f73e
+.set fp20,20; .set fp21,21; .set fp22,22; .set fp23,23; .set fp24,24
b2f73e
+.set fp25,25; .set fp26,26; .set fp27,27; .set fp28,28; .set fp29,29
b2f73e
+.set fp30,30; .set fp31,31
b2f73e
+.set v0,0; .set v1,1; .set v2,2; .set v3,3; .set v4,4
b2f73e
+.set v5,5; .set v6,6; .set v7,7; .set v8,8; .set v9,9
b2f73e
+.set v10,10; .set v11,11; .set v12,12; .set v13,13; .set v14,14
b2f73e
+.set v15,15; .set v16,16; .set v17,17; .set v18,18; .set v19,19
b2f73e
+.set v20,20; .set v21,21; .set v22,22; .set v23,23; .set v24,24
b2f73e
+.set v25,25; .set v26,26; .set v27,27; .set v28,28; .set v29,29
b2f73e
+.set v30,30; .set v31,31
b2f73e
+.set q0,0; .set q1,1; .set q2,2; .set q3,3; .set q4,4
b2f73e
+.set q5,5; .set q6,6; .set q7,7; .set q8,8; .set q9,9
b2f73e
+.set q10,10; .set q11,11; .set q12,12; .set q13,13; .set q14,14
b2f73e
+.set q15,15; .set q16,16; .set q17,17; .set q18,18; .set q19,19
b2f73e
+.set q20,20; .set q21,21; .set q22,22; .set q23,23; .set q24,24
b2f73e
+.set q25,25; .set q26,26; .set q27,27; .set q28,28; .set q29,29
b2f73e
+.set q30,30; .set q31,31
b2f73e
+.set MQ,0; .set XER,1; .set FROM_RTCU,4; .set FROM_RTCL,5; .set FROM_DEC,6
b2f73e
+.set LR,8; .set CTR,9; .set TID,17; .set DSISR,18; .set DAR,19; .set TO_RTCU,20
b2f73e
+.set TO_RTCL,21; .set TO_DEC,22; .set SDR_0,24; .set SDR_1,25; .set SRR_0,26
b2f73e
+.set SRR_1,27
b2f73e
+.set BO_dCTR_NZERO_AND_NOT,0; .set BO_dCTR_NZERO_AND_NOT_1,1
b2f73e
+.set BO_dCTR_ZERO_AND_NOT,2; .set BO_dCTR_ZERO_AND_NOT_1,3
b2f73e
+.set BO_IF_NOT,4; .set BO_IF_NOT_1,5; .set BO_IF_NOT_2,6
b2f73e
+.set BO_IF_NOT_3,7; .set BO_dCTR_NZERO_AND,8; .set BO_dCTR_NZERO_AND_1,9
b2f73e
+.set BO_dCTR_ZERO_AND,10; .set BO_dCTR_ZERO_AND_1,11; .set BO_IF,12
b2f73e
+.set BO_IF_1,13; .set BO_IF_2,14; .set BO_IF_3,15; .set BO_dCTR_NZERO,16
b2f73e
+.set BO_dCTR_NZERO_1,17; .set BO_dCTR_ZERO,18; .set BO_dCTR_ZERO_1,19
b2f73e
+.set BO_ALWAYS,20; .set BO_ALWAYS_1,21; .set BO_ALWAYS_2,22
b2f73e
+.set BO_ALWAYS_3,23; .set BO_dCTR_NZERO_8,24; .set BO_dCTR_NZERO_9,25
b2f73e
+.set BO_dCTR_ZERO_8,26; .set BO_dCTR_ZERO_9,27; .set BO_ALWAYS_8,28
b2f73e
+.set BO_ALWAYS_9,29; .set BO_ALWAYS_10,30; .set BO_ALWAYS_11,31
b2f73e
+.set CR0_LT,0; .set CR0_GT,1; .set CR0_EQ,2; .set CR0_SO,3
b2f73e
+.set CR1_FX,4; .set CR1_FEX,5; .set CR1_VX,6; .set CR1_OX,7
b2f73e
+.set CR2_LT,8; .set CR2_GT,9; .set CR2_EQ,10; .set CR2_SO,11
b2f73e
+.set CR3_LT,12; .set CR3_GT,13; .set CR3_EQ,14; .set CR3_SO,15
b2f73e
+.set CR4_LT,16; .set CR4_GT,17; .set CR4_EQ,18; .set CR4_SO,19
b2f73e
+.set CR5_LT,20; .set CR5_GT,21; .set CR5_EQ,22; .set CR5_SO,23
b2f73e
+.set CR6_LT,24; .set CR6_GT,25; .set CR6_EQ,26; .set CR6_SO,27
b2f73e
+.set CR7_LT,28; .set CR7_GT,29; .set CR7_EQ,30; .set CR7_SO,31
b2f73e
+.set TO_LT,16; .set TO_GT,8; .set TO_EQ,4; .set TO_LLT,2; .set TO_LGT,1
b2f73e
+
b2f73e
+	.file	"xlf-variable.f"
b2f73e
+	.globl	__mod1_NMOD_____mod1
b2f73e
+	.type	__mod1_NMOD_____mod1,@function
b2f73e
+	.size	__mod1_NMOD_____mod1,32
b2f73e
+	.globl	main
b2f73e
+	.type	main,@function
b2f73e
+	.size	main,68
b2f73e
+	.globl	__mod1_NMOD_sub1
b2f73e
+	.type	__mod1_NMOD_sub1,@function
b2f73e
+	.size	__mod1_NMOD_sub1,136
b2f73e
+	.globl	_main
b2f73e
+	.type	_main,@function
b2f73e
+	.size	_main,68
b2f73e
+
b2f73e
+	.section	".text"
b2f73e
+	.align	7
b2f73e
+.LC.text:
b2f73e
+__mod1_NMOD_____mod1:
b2f73e
+	stwu       SP,-32(SP)
b2f73e
+	stw        r31,28(SP)
b2f73e
+	or         r31,SP,SP
b2f73e
+	b          $+0x4
b2f73e
+	addi       r11,r31,32
b2f73e
+	lwz        r31,-4(r11)
b2f73e
+	or         SP,r11,r11
b2f73e
+	bclr       BO_ALWAYS,CR0_LT
b2f73e
+.LC.text32:
b2f73e
+
b2f73e
+__mod1_NMOD_sub1:
b2f73e
+	stwu       SP,-32(SP)
b2f73e
+	stw        r31,28(SP)
b2f73e
+	stw        r30,24(SP)
b2f73e
+	or         r31,SP,SP
b2f73e
+	addis      r30,r0,.const_dr@ha
b2f73e
+	addi       r30,r30,.const_dr@l
b2f73e
+	addis      r3,r0,__N_mod1@ha
b2f73e
+	addi       r3,r3,__N_mod1@l
b2f73e
+	addi       r0,r0,1
b2f73e
+	stb        r0,4(r3)
b2f73e
+	addi       r4,r0,14
b2f73e
+	stb        r4,5(r3)
b2f73e
+	stb        r0,7(r3)
b2f73e
+	addis      r5,r0,__N__mod1@ha
b2f73e
+	addi       r5,r5,__N__mod1@l
b2f73e
+	stw        r5,0(r3)
b2f73e
+	lbz        r5,6(r3)
b2f73e
+	rlwinm     r5,r5,0,25,25
b2f73e
+	ori        r5,r5,0x0040
b2f73e
+	stb        r5,6(r3)
b2f73e
+	lwz        r5,0(r3)
b2f73e
+	lfs        fp0,0(r30)
b2f73e
+	stfs       fp0,0(r5)
b2f73e
+	stb        r0,4(r3)
b2f73e
+	stb        r4,5(r3)
b2f73e
+	addi       r4,r0,0
b2f73e
+	stb        r4,6(r3)
b2f73e
+	stb        r0,7(r3)
b2f73e
+	b          $+0x4
b2f73e
+	addi       r11,r31,32
b2f73e
+	lwz        r30,-8(r11)
b2f73e
+	lwz        r31,-4(r11)
b2f73e
+	or         SP,r11,r11
b2f73e
+	bclr       BO_ALWAYS,CR0_LT
b2f73e
+.LC.text168:
b2f73e
+	.long 0
b2f73e
+	.skip 0x54
b2f73e
+.LC.text256:
b2f73e
+
b2f73e
+main:
b2f73e
+_main:
b2f73e
+	mfspr      r0,LR
b2f73e
+	stwu       SP,-32(SP)
b2f73e
+	stw        r31,28(SP)
b2f73e
+	stw        r0,36(SP)
b2f73e
+	or         r31,SP,SP
b2f73e
+	bl         __mod1_NMOD_sub1
b2f73e
+	addi       r3,r0,0
b2f73e
+.LC.text288:
b2f73e
+
b2f73e
+	tw         TO_EQ,r14,r14
b2f73e
+	addi       r3,r0,0
b2f73e
+	b          $+0x4
b2f73e
+	addi       r11,r31,32
b2f73e
+	lwz        r31,-4(r11)
b2f73e
+	lwz        r0,4(r11)
b2f73e
+	mtspr      LR,r0
b2f73e
+	or         SP,r11,r11
b2f73e
+	bclr       BO_ALWAYS,CR0_LT
b2f73e
+.LC.text324:
b2f73e
+
b2f73e
+
b2f73e
+	.section	".rodata","a"
b2f73e
+	.align	2
b2f73e
+.LC.rodata:
b2f73e
+	.type    .const_dr,@object
b2f73e
+	.size    .const_dr,4
b2f73e
+.const_dr:
b2f73e
+	.long 0x40400000
b2f73e
+
b2f73e
+	.section	".eh_frame","wa"
b2f73e
+	.align	2
b2f73e
+.LC.eh_frame:
b2f73e
+	.long 0x0000000c
b2f73e
+	.long 0x00000000
b2f73e
+	.long 0x0100047c
b2f73e
+	.long 0x410c0100
b2f73e
+	.long 0x0000001c
b2f73e
+	.long 0x00000014
b2f73e
+	.long .LC.text
b2f73e
+	.long 0x00000020
b2f73e
+	.long 0x410e2041
b2f73e
+	.long 0x9f01410d
b2f73e
+	.long 0x1f410a42
b2f73e
+	.long 0xdf420b00
b2f73e
+	.long 0x00000020
b2f73e
+	.long 0x00000034
b2f73e
+	.long .LC.text32
b2f73e
+	.long 0x00000088
b2f73e
+	.long 0x410e2041
b2f73e
+	.long 0x9f01419e
b2f73e
+	.long 0x02410d1f
b2f73e
+	.long 0x590a42de
b2f73e
+	.long 0x41df420b
b2f73e
+	.long 0x0000000c
b2f73e
+	.long 0x00000000
b2f73e
+	.long 0x0100047c
b2f73e
+	.long 0x410c0100
b2f73e
+	.long 0x00000020
b2f73e
+	.long 0x00000014
b2f73e
+	.long .LC.text256
b2f73e
+	.long 0x00000044
b2f73e
+	.long 0x420e2041
b2f73e
+	.long 0x9f014111
b2f73e
+	.long 0x417f410d
b2f73e
+	.long 0x1f460a42
b2f73e
+	.long 0xdf440b00
b2f73e
+
b2f73e
+	.section	".data","wa"
b2f73e
+	.align	4
b2f73e
+.LC.data:
b2f73e
+	.globl __N_mod1
b2f73e
+	.type    __N_mod1,@object
b2f73e
+	.size    __N_mod1,8
b2f73e
+__N_mod1:
b2f73e
+	.long 0x00000000
b2f73e
+	.long 0x01000001
b2f73e
+
b2f73e
+	.section	".except.1","wa"
b2f73e
+	.align	1
b2f73e
+.LC.except.1:
b2f73e
+	.long .LC.text288
b2f73e
+	.byte 0x01
b2f73e
+	.byte 0x09
b2f73e
+
b2f73e
+	.ident  "Fri Jun 15 16:35:45 2012 .IBM XL Fortran for Linux, V14.1 (5765-J05, 5725-C75) Version 14.01.0000.0000.Fri Jun 15 16:35:45 2012 .IBM XL Fortran for Linux, V14.1 (5765-J05, 5725-C75) Version 14.01.0000.0000."
b2f73e
+
b2f73e
+	.section	".debug_aranges"
b2f73e
+	.align	0
b2f73e
+.LC.debug_aranges:
b2f73e
+	.long 0x0000001c
b2f73e
+	.byte 0x00
b2f73e
+	.byte 0x02
b2f73e
+	.long .LC.debug_info
b2f73e
+	.long 0x04000000
b2f73e
+	.byte 0x00
b2f73e
+	.byte 0x00
b2f73e
+	.long .LC.text
b2f73e
+	.long 0x000000a8
b2f73e
+	.long 0x00000000
b2f73e
+	.long 0x00000000
b2f73e
+	.long 0x0000001c
b2f73e
+	.byte 0x00
b2f73e
+	.byte 0x02
b2f73e
+	.long .LC.debug_info273
b2f73e
+	.long 0x04000000
b2f73e
+	.byte 0x00
b2f73e
+	.byte 0x00
b2f73e
+	.long .LC.text256
b2f73e
+	.long 0x00000044
b2f73e
+	.long 0x00000000
b2f73e
+	.long 0x00000000
b2f73e
+
b2f73e
+	.section	".debug_pubnames"
b2f73e
+	.align	0
b2f73e
+.LC.debug_pubnames:
b2f73e
+	.long 0x0000002f
b2f73e
+	.byte 0x00
b2f73e
+	.byte 0x02
b2f73e
+	.long .LC.debug_info
b2f73e
+	.long 0x00000111
b2f73e
+	.long 0x000000dc
b2f73e
+	.long 0x79000000
b2f73e
+	.long 0x00ec7a00
b2f73e
+	.long 0x000000fc
b2f73e
+	.long 0x5f5f6d6f
b2f73e
+	.long 0x64315f4e
b2f73e
+	.long 0x4d4f445f
b2f73e
+	.long 0x73756231
b2f73e
+	.long 0x00000000
b2f73e
+	.long 0x00000000
b2f73e
+	.byte 0x18
b2f73e
+	.byte 0x00
b2f73e
+	.byte 0x02
b2f73e
+	.long .LC.debug_info273
b2f73e
+	.long 0x00000127
b2f73e
+	.long 0x0000010f
b2f73e
+	.long 0x5f6d6169
b2f73e
+	.long 0x6e000000
b2f73e
+	.byte 0x00
b2f73e
+	.byte 0x00
b2f73e
+
b2f73e
+	.section	".debug_info"
b2f73e
+	.align	0
b2f73e
+.LC.debug_info:
b2f73e
+	.long 0x0000010d
b2f73e
+	.byte 0x00
b2f73e
+	.byte 0x02
b2f73e
+	.long .LC.debug_abbrev
b2f73e
+	.long 0x0401786c
b2f73e
+	.long 0x662d7661
b2f73e
+	.long 0x72696162
b2f73e
+	.long 0x6c652e66
b2f73e
+	.byte 0x00
b2f73e
+	.long .LC.debug_line
b2f73e
+	.long .LC.text
b2f73e
+	.long .LC.text168
b2f73e
+	.long 0x082f726f
b2f73e
+	.long 0x6f742f73
b2f73e
+	.long 0x65726769
b2f73e
+	.long 0x6f646a2f
b2f73e
+	.long 0x6764622d
b2f73e
+	.long 0x372e302e
b2f73e
+	.long 0x312d3432
b2f73e
+	.long 0x2e656c35
b2f73e
+	.long 0x2f676462
b2f73e
+	.long 0x2d372e30
b2f73e
+	.long 0x2e312f67
b2f73e
+	.long 0x64622f74
b2f73e
+	.long 0x65737473
b2f73e
+	.long 0x75697465
b2f73e
+	.long 0x2f676462
b2f73e
+	.long 0x2e666f72
b2f73e
+	.long 0x7472616e
b2f73e
+	.long 0x0049424d
b2f73e
+	.long 0x20584c20
b2f73e
+	.long 0x466f7274
b2f73e
+	.long 0x72616e20
b2f73e
+	.long 0x666f7220
b2f73e
+	.long 0x4c696e75
b2f73e
+	.long 0x782c2056
b2f73e
+	.long 0x31342e31
b2f73e
+	.long 0x20283537
b2f73e
+	.long 0x36352d4a
b2f73e
+	.long 0x30352c20
b2f73e
+	.long 0x35373235
b2f73e
+	.long 0x2d433735
b2f73e
+	.long 0x29205665
b2f73e
+	.long 0x7273696f
b2f73e
+	.long 0x6e203134
b2f73e
+	.long 0x2e30312e
b2f73e
+	.long 0x30303030
b2f73e
+	.long 0x2e303030
b2f73e
+	.long 0x30000249
b2f73e
+	.long 0x4e544547
b2f73e
+	.long 0x45520004
b2f73e
+	.long 0x05030005
b2f73e
+	.long 0x02524541
b2f73e
+	.long 0x4c000404
b2f73e
+	.long 0x04050000
b2f73e
+	.long 0x0000c706
b2f73e
+	.long 0x6d6f6431
b2f73e
+	.long 0x00070503
b2f73e
+	.long __N_mod1
b2f73e
+	.long 0x79000100
b2f73e
+	.long 0x01000000
b2f73e
+	.long 0xd0070503
b2f73e
+	.long __N__mod1
b2f73e
+	.long 0x7a000100
b2f73e
+	.long 0x01000000
b2f73e
+	.long 0xc7087375
b2f73e
+	.byte 0x62
b2f73e
+	.byte 0x31
b2f73e
+	.byte 0x00
b2f73e
+	.long .LC.text32
b2f73e
+	.long .LC.text168
b2f73e
+	.long 0x01180101
b2f73e
+	.byte 0x6f
b2f73e
+	.byte 0x00
b2f73e
+	.byte 0x00
b2f73e
+.LC.debug_info273:
b2f73e
+	.long 0x00000123
b2f73e
+	.byte 0x00
b2f73e
+	.byte 0x02
b2f73e
+	.long .LC.debug_abbrev97
b2f73e
+	.long 0x0401786c
b2f73e
+	.long 0x662d7661
b2f73e
+	.long 0x72696162
b2f73e
+	.long 0x6c652e66
b2f73e
+	.byte 0x00
b2f73e
+	.long .LC.debug_line98
b2f73e
+	.long .LC.text256
b2f73e
+	.long .LC.text324
b2f73e
+	.long 0x082f726f
b2f73e
+	.long 0x6f742f73
b2f73e
+	.long 0x65726769
b2f73e
+	.long 0x6f646a2f
b2f73e
+	.long 0x6764622d
b2f73e
+	.long 0x372e302e
b2f73e
+	.long 0x312d3432
b2f73e
+	.long 0x2e656c35
b2f73e
+	.long 0x2f676462
b2f73e
+	.long 0x2d372e30
b2f73e
+	.long 0x2e312f67
b2f73e
+	.long 0x64622f74
b2f73e
+	.long 0x65737473
b2f73e
+	.long 0x75697465
b2f73e
+	.long 0x2f676462
b2f73e
+	.long 0x2e666f72
b2f73e
+	.long 0x7472616e
b2f73e
+	.long 0x0049424d
b2f73e
+	.long 0x20584c20
b2f73e
+	.long 0x466f7274
b2f73e
+	.long 0x72616e20
b2f73e
+	.long 0x666f7220
b2f73e
+	.long 0x4c696e75
b2f73e
+	.long 0x782c2056
b2f73e
+	.long 0x31342e31
b2f73e
+	.long 0x20283537
b2f73e
+	.long 0x36352d4a
b2f73e
+	.long 0x30352c20
b2f73e
+	.long 0x35373235
b2f73e
+	.long 0x2d433735
b2f73e
+	.long 0x29205665
b2f73e
+	.long 0x7273696f
b2f73e
+	.long 0x6e203134
b2f73e
+	.long 0x2e30312e
b2f73e
+	.long 0x30303030
b2f73e
+	.long 0x2e303030
b2f73e
+	.long 0x30000249
b2f73e
+	.long 0x4e544547
b2f73e
+	.long 0x45520004
b2f73e
+	.long 0x05030005
b2f73e
+	.long 0x02524541
b2f73e
+	.long 0x4c000404
b2f73e
+	.long 0x04000000
b2f73e
+	.long 0xb9050000
b2f73e
+	.long 0x0000c706
b2f73e
+	.long 0x000000f4
b2f73e
+	.long 0x26264e26
b2f73e
+	.long 0x6d6f6431
b2f73e
+	.long 0x00080779
b2f73e
+	.long 0x00022300
b2f73e
+	.long 0x000000d4
b2f73e
+	.long 0x00060000
b2f73e
+	.long 0x010f2626
b2f73e
+	.long 0x4e26266d
b2f73e
+	.long 0x6f643100
b2f73e
+	.long 0x04077a00
b2f73e
+	.long 0x02230000
b2f73e
+	.long 0x0000c700
b2f73e
+	.long 0x085f6d61
b2f73e
+	.byte 0x69
b2f73e
+	.byte 0x6e
b2f73e
+	.byte 0x00
b2f73e
+	.long .LC.text256
b2f73e
+	.long .LC.text324
b2f73e
+	.long 0x0201016f
b2f73e
+	.long 0x000000b9
b2f73e
+	.byte 0x00
b2f73e
+
b2f73e
+	.section	".debug_abbrev"
b2f73e
+	.align	0
b2f73e
+.LC.debug_abbrev:
b2f73e
+	.long 0x01110103
b2f73e
+	.long 0x08100611
b2f73e
+	.long 0x01120113
b2f73e
+	.long 0x0b1b0825
b2f73e
+	.long 0x08000002
b2f73e
+	.long 0x24000308
b2f73e
+	.long 0x0b0b3e0b
b2f73e
+	.long 0x00000324
b2f73e
+	.long 0x000b0b3e
b2f73e
+	.long 0x0b000004
b2f73e
+	.long 0x15000000
b2f73e
+	.long 0x050f0033
b2f73e
+	.long 0x0b491300
b2f73e
+	.long 0x00061e01
b2f73e
+	.long 0x03080000
b2f73e
+	.long 0x07340002
b2f73e
+	.long 0x0a03083a
b2f73e
+	.long 0x0b3b0b3f
b2f73e
+	.long 0x0c491300
b2f73e
+	.long 0x00082e00
b2f73e
+	.long 0x03081101
b2f73e
+	.long 0x12013a0b
b2f73e
+	.long 0x3b0b3f0c
b2f73e
+	.long 0x400a0000
b2f73e
+	.byte 0x00
b2f73e
+.LC.debug_abbrev97:
b2f73e
+	.long 0x01110103
b2f73e
+	.long 0x08100611
b2f73e
+	.long 0x01120113
b2f73e
+	.long 0x0b1b0825
b2f73e
+	.long 0x08000002
b2f73e
+	.long 0x24000308
b2f73e
+	.long 0x0b0b3e0b
b2f73e
+	.long 0x00000324
b2f73e
+	.long 0x000b0b3e
b2f73e
+	.long 0x0b000004
b2f73e
+	.long 0x15004913
b2f73e
+	.long 0x0000050f
b2f73e
+	.long 0x00330b49
b2f73e
+	.long 0x13000006
b2f73e
+	.long 0x13010113
b2f73e
+	.long 0x03080b0b
b2f73e
+	.long 0x0000070d
b2f73e
+	.long 0x00030838
b2f73e
+	.long 0x0a491300
b2f73e
+	.long 0x00082e00
b2f73e
+	.long 0x03081101
b2f73e
+	.long 0x1201360b
b2f73e
+	.long 0x3f0c400a
b2f73e
+	.long 0x49130000
b2f73e
+	.byte 0x00
b2f73e
+
b2f73e
+	.section	".debug_line"
b2f73e
+	.align	0
b2f73e
+.LC.debug_line:
b2f73e
+	.long 0x0000005e
b2f73e
+	.long 0x00020000
b2f73e
+	.long 0x00220101
b2f73e
+	.long 0x9cdc0a00
b2f73e
+	.long 0x01010101
b2f73e
+	.long 0x00000001
b2f73e
+	.long 0x00786c66
b2f73e
+	.long 0x2d766172
b2f73e
+	.long 0x6961626c
b2f73e
+	.long 0x652e6600
b2f73e
+	.long 0x00000000
b2f73e
+	.long 0x04010005
b2f73e
+	.byte 0x02
b2f73e
+	.long .LC.text
b2f73e
+	.long 0x03130109
b2f73e
+	.long 0x000c0309
b2f73e
+	.long 0x01090014
b2f73e
+	.long 0x037b0109
b2f73e
+	.long 0x00180301
b2f73e
+	.long 0x01090038
b2f73e
+	.long 0x03010109
b2f73e
+	.long 0x000c0301
b2f73e
+	.long 0x01090014
b2f73e
+	.long 0x03010109
b2f73e
+	.long 0x00180001
b2f73e
+	.byte 0x01
b2f73e
+.LC.debug_line98:
b2f73e
+	.long 0x00000046
b2f73e
+	.long 0x00020000
b2f73e
+	.long 0x00220101
b2f73e
+	.long 0x9cdc0a00
b2f73e
+	.long 0x01010101
b2f73e
+	.long 0x00000001
b2f73e
+	.long 0x00786c66
b2f73e
+	.long 0x2d766172
b2f73e
+	.long 0x6961626c
b2f73e
+	.long 0x652e6600
b2f73e
+	.long 0x00000000
b2f73e
+	.long 0x04010005
b2f73e
+	.byte 0x02
b2f73e
+	.long .LC.text256
b2f73e
+	.long 0x031f0109
b2f73e
+	.long 0x00140300
b2f73e
+	.long 0x01090004
b2f73e
+	.long 0x03010109
b2f73e
+	.long 0x002c0001
b2f73e
+	.byte 0x01
b2f73e
+
b2f73e
+	.section	".debug_frame"
b2f73e
+	.align	0
b2f73e
+.LC.debug_frame:
b2f73e
+	.long 0x0000000c
b2f73e
+	.long 0xffffffff
b2f73e
+	.long 0x0100047c
b2f73e
+	.long 0x410c0100
b2f73e
+	.long 0x0000001c
b2f73e
+	.long .LC.debug_frame
b2f73e
+	.long .LC.text
b2f73e
+	.long 0x00000020
b2f73e
+	.long 0x410e2041
b2f73e
+	.long 0x9f01410d
b2f73e
+	.long 0x1f410a42
b2f73e
+	.long 0xdf420b00
b2f73e
+	.long 0x00000020
b2f73e
+	.long .LC.debug_frame
b2f73e
+	.long .LC.text32
b2f73e
+	.long 0x00000088
b2f73e
+	.long 0x410e2041
b2f73e
+	.long 0x9f01419e
b2f73e
+	.long 0x02410d1f
b2f73e
+	.long 0x590a42de
b2f73e
+	.long 0x41df420b
b2f73e
+.LC.debug_frame84:
b2f73e
+	.long 0x0000000c
b2f73e
+	.long 0xffffffff
b2f73e
+	.long 0x0100047c
b2f73e
+	.long 0x410c0100
b2f73e
+	.long 0x00000020
b2f73e
+	.long .LC.debug_frame84
b2f73e
+	.long .LC.text256
b2f73e
+	.long 0x00000044
b2f73e
+	.long 0x420e2041
b2f73e
+	.long 0x9f014111
b2f73e
+	.long 0x417f410d
b2f73e
+	.long 0x1f460a42
b2f73e
+	.long 0xdf440b00
b2f73e
+
b2f73e
+	.section	".debug_pubtypes"
b2f73e
+	.align	0
b2f73e
+.LC.debug_pubtypes:
b2f73e
+	.long 0x00000023
b2f73e
+	.byte 0x00
b2f73e
+	.byte 0x02
b2f73e
+	.long .LC.debug_info
b2f73e
+	.long 0x00000111
b2f73e
+	.long 0x000000b9
b2f73e
+	.long 0x494e5445
b2f73e
+	.long 0x47455200
b2f73e
+	.long 0x000000c7
b2f73e
+	.long 0x5245414c
b2f73e
+	.long 0x00000000
b2f73e
+	.long 0x00000000
b2f73e
+	.byte 0x3e
b2f73e
+	.byte 0x00
b2f73e
+	.byte 0x02
b2f73e
+	.long .LC.debug_info273
b2f73e
+	.long 0x00000127
b2f73e
+	.long 0x000000b9
b2f73e
+	.long 0x494e5445
b2f73e
+	.long 0x47455200
b2f73e
+	.long 0x000000c7
b2f73e
+	.long 0x5245414c
b2f73e
+	.long 0x00000000
b2f73e
+	.long 0xda26264e
b2f73e
+	.long 0x266d6f64
b2f73e
+	.long 0x31000000
b2f73e
+	.long 0x00f42626
b2f73e
+	.long 0x4e26266d
b2f73e
+	.long 0x6f643100
b2f73e
+	.long 0x00000000
b2f73e
+
b2f73e
+	.comm   __N__mod1,4,16
b2f73e
diff --git a/gdb/testsuite/gdb.fortran/xlf-variable.exp b/gdb/testsuite/gdb.fortran/xlf-variable.exp
b2f73e
new file mode 100644
b2f73e
--- /dev/null
b2f73e
+++ b/gdb/testsuite/gdb.fortran/xlf-variable.exp
b2f73e
@@ -0,0 +1,37 @@
b2f73e
+# Copyright 2012 Free Software Foundation, Inc.
b2f73e
+
b2f73e
+# This program is free software; you can redistribute it and/or modify
b2f73e
+# it under the terms of the GNU General Public License as published by
b2f73e
+# the Free Software Foundation; either version 3 of the License, or
b2f73e
+# (at your option) any later version.
b2f73e
+#
b2f73e
+# This program is distributed in the hope that it will be useful,
b2f73e
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
b2f73e
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
b2f73e
+# GNU General Public License for more details.
b2f73e
+#
b2f73e
+# You should have received a copy of the GNU General Public License
b2f73e
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
b2f73e
+
b2f73e
+# This test can only be run on PPC64 machines.
b2f73e
+
b2f73e
+if { ![istarget powerpc64-*] || ![is_ilp32_target] } {
b2f73e
+    return -1
b2f73e
+}
b2f73e
+
b2f73e
+set testfile "xlf-variable"
b2f73e
+set srcfile ${testfile}.S
b2f73e
+
b2f73e
+if { [prepare_for_testing $testfile.exp $testfile $srcfile] } {
b2f73e
+    return -1
b2f73e
+}
b2f73e
+
b2f73e
+if { ![runto_main] } {
b2f73e
+    return -1
b2f73e
+}
b2f73e
+
b2f73e
+gdb_test "step" ".*y => z.*" "y => z"
b2f73e
+gdb_test "step" ".*y = 3\.0.*" "y = 3.0"
b2f73e
+gdb_test "step" ".*nullify \\(y\\).*" "nullify (y)"
b2f73e
+gdb_test "print z" "= 3" "z = 3"
b2f73e
+gdb_test "ptype z" "= REAL" "z is REAL"
b2f73e
diff --git a/gdb/testsuite/gdb.fortran/xlf-variable.f b/gdb/testsuite/gdb.fortran/xlf-variable.f
b2f73e
new file mode 100644
b2f73e
--- /dev/null
b2f73e
+++ b/gdb/testsuite/gdb.fortran/xlf-variable.f
b2f73e
@@ -0,0 +1,33 @@
b2f73e
+c Copyright 2012 Free Software Foundation, Inc.
b2f73e
+c
b2f73e
+c This program is free software; you can redistribute it and/or modify
b2f73e
+c it under the terms of the GNU General Public License as published by
b2f73e
+c the Free Software Foundation; either version 3 of the License, or
b2f73e
+c (at your option) any later version.
b2f73e
+c
b2f73e
+c This program is distributed in the hope that it will be useful,
b2f73e
+c but WITHOUT ANY WARRANTY; without even the implied warranty of
b2f73e
+c MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
b2f73e
+c GNU General Public License for more details.
b2f73e
+c
b2f73e
+c You should have received a copy of the GNU General Public License
b2f73e
+c along with this program.  If not, see <http://www.gnu.org/licenses/>.
b2f73e
+
b2f73e
+c This file is the Fortran source file for xlf-variable.f.
b2f73e
+c It was used to generate the assembly output called xlf-variable.S,
b2f73e
+c which was generated using IBM's XLF compiler.
b2f73e
+
b2f73e
+        module mod1
b2f73e
+          real, pointer :: y
b2f73e
+          real, target :: z
b2f73e
+        contains
b2f73e
+          subroutine sub1
b2f73e
+            y => z
b2f73e
+            y = 3.0
b2f73e
+            nullify (y)
b2f73e
+          end subroutine
b2f73e
+        end module
b2f73e
+
b2f73e
+        use mod1
b2f73e
+        call sub1
b2f73e
+        end