dblaikie added a subscriber: echristo.
dblaikie added a comment.

In D79147#2178104 <https://reviews.llvm.org/D79147#2178104>, @russell.gallop 
wrote:
> Hi,
>
> It looks like is causing one of the debuginfo-tests: 
> llgdb-tests/nrvo-string.cpp to fail, run on Linux. Failure as below. I don't 
> think the debuginfo-tests are run on any bot (but probably should be!). I 
> bisected the failure back to this change.
>
> Please could you take a look?
>
> Thanks
> Russ
>
>   FAIL: debuginfo-tests :: llgdb-tests/nrvo-string.cpp (1 of 1)
>   ******************** TEST 'debuginfo-tests :: llgdb-tests/nrvo-string.cpp' 
> FAILED ********************
>   Script:
>   --
>   : 'RUN: at line 4';   /home/<user>/git/llvm-project/stage1/bin/clang 
> --driver-mode=g++ -O0 -fno-exceptions --target=x86_64-unknown-linux-gnu 
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp -o 
> /home/<user>/git/llvm-project/stage1/projects/debuginfo-tests/llgdb-tests/Output/nrvo-string.cpp.tmp.out
>  -g
>   : 'RUN: at line 5';   
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/test_debuginfo.pl 
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp 
> /home/<user>/git/llvm-project/stage1/projects/debuginfo-tests/llgdb-tests/Output/nrvo-string.cpp.tmp.out
>   : 'RUN: at line 6';   /home/<user>/git/llvm-project/stage1/bin/clang 
> --driver-mode=g++ -O1 -fno-exceptions --target=x86_64-unknown-linux-gnu 
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp -o 
> /home/<user>/git/llvm-project/stage1/projects/debuginfo-tests/llgdb-tests/Output/nrvo-string.cpp.tmp.out
>  -g
>   : 'RUN: at line 7';   
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/test_debuginfo.pl 
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp 
> /home/<user>/git/llvm-project/stage1/projects/debuginfo-tests/llgdb-tests/Output/nrvo-string.cpp.tmp.out
>   --
>   Exit Code: 1
>   
>   Command Output (stdout):
>   --
>   Debugger output was:
>   Breakpoint 1 at 0x4004f8: file 
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp, 
> line 23.
>   Breakpoint 2 at 0x400563: file 
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp, 
> line 39.
>   
>   Breakpoint 1, get_string () at 
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp:23
>   23        stop();
>   $1 = 3
>   
>   Breakpoint 2, get_string2 () at 
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp:39
>   39        stop();
>   
> /home/<user>/git/llvm-project/stage1/projects/debuginfo-tests/llgdb-tests/Output/nrvo-string.cpp.debugger.script:6:
>  Error in sourced command file:
>   There is no member named i.
>   
>   --
>   Command Output (stderr):
>   --
>   
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp:52:11:
>  error: CHECK: expected string not found in input
>   // CHECK: = 5
>             ^
>   
> /home/<user>/git/llvm-project/stage1/projects/debuginfo-tests/llgdb-tests/Output/nrvo-string.cpp.gdb.output:8:1:
>  note: scanning from here
>   Breakpoint 2, get_string2 () at 
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp:39
>   ^
>   
> /home/<user>/git/llvm-project/stage1/projects/debuginfo-tests/llgdb-tests/Output/nrvo-string.cpp.gdb.output:8:10:
>  note: possible intended match here
>   Breakpoint 2, get_string2 () at 
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp:39
>            ^
>   
>   Input file: 
> /home/<user>/git/llvm-project/stage1/projects/debuginfo-tests/llgdb-tests/Output/nrvo-string.cpp.gdb.output
>   Check file: 
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp
>   
>   -dump-input=help explains the following input dump.
>   
>   Full input was:
>   <<<<<<
>               1: Breakpoint 1 at 0x4004f8: file 
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp, 
> line 23.
>               2: Breakpoint 2 at 0x400563: file 
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp, 
> line 39.
>               3:
>               4: Breakpoint 1, get_string () at 
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp:23
>               5: 23 stop();
>               6: $1 = 3
>               7:
>               8: Breakpoint 2, get_string2 () at 
> /home/<user>/git/llvm-project/debuginfo-tests/llgdb-tests/nrvo-string.cpp:39
>   check:52'0     
> X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>  error: no match found
>   check:52'1              ?                                                   
>                                                  possible intended match
>               9: 39 stop();
>   check:52'0     ~~~~~~~~~~
>              10: 
> /home/<user>/git/llvm-project/stage1/projects/debuginfo-tests/llgdb-tests/Output/nrvo-string.cpp.debugger.script:6:
>  Error in sourced command file:
>   check:52'0     
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>              11: There is no member named i.
>   check:52'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   >>>>>>
>   
>   --

Yep, this looks like a bug in constructor homing (@echristo fyi), here's a 
reduced test case:

  struct t1 {
    t1() = default;
    t1(int);
    int i;
  };
  t1 v1;

The defaulted default constructor is used, but incorrectly does not home the 
debug info, producing just this IR:

  !6 = !DICompositeType(tag: DW_TAG_structure_type, name: "t1", file: !3, line: 
1, flags: DIFlagFwdDecl, identifier: "_ZTS2t1")

Removing the non-default ctor gets the desired type definition:

  !6 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "t1", file: 
!3, line: 1, size: 32, flags: DIFlagTypePassByValue, elements: !7, identifier: 
"_ZTS2t1")




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79147/new/

https://reviews.llvm.org/D79147

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D79147: Switch to u... Russell Gallop via Phabricator via cfe-commits
    • [PATCH] D79147: Switch... David Blaikie via Phabricator via cfe-commits

Reply via email to